Page 1 of 1

CMD Set Enviornment Variables Help

Posted: Tue Jan 05, 2010 12:57 pm
by someguy
Im making a command script-type thing (is going very well can type google and it goes google xD) but how to say "if variable "a" is not equal to *somemocode* then do *this*) so "if %variable%*u tell me the'not=to sign here'*password shutdown -s -t 10 -c "HA!""

CMD Set Enviornment Variables Help

Posted: Tue Jan 05, 2010 12:57 pm
by someguy
Im making a command script-type thing (is going very well can type google and it goes google xD) but how to say "if variable "a" is not equal to *somemocode* then do *this*) so "if %variable%*u tell me the'not=to sign here'*password shutdown -s -t 10 -c "HA!""

CMD Set Enviornment Variables Help

Posted: Tue Jan 05, 2010 12:58 pm
by someguy
in other words how do i tell the Command Prompt that if a variable is not equal to another variable then shutdown

CMD Set Enviornment Variables Help

Posted: Wed Jan 06, 2010 6:56 am
by jhicks
Is this the sort of thing you are after?set var=fooif %var%==foo (echo Shutting down) else (echo Staying up)

CMD Set Enviornment Variables Help

Posted: Wed Jan 06, 2010 7:50 am
by someguy
Thanks!someguy2010-01-06 15:00:14

CMD Set Enviornment Variables Help

Posted: Wed Jan 06, 2010 8:13 am
by someguy
also how to hide keys? (as in a password field)