If you don't want to read the whole text just read the bolded lines.
I made the following batch file which shuts down the computer. I have to enter a number and then it waits that number of seconds till it shuts down, nothing fancy.
This is the source
[code:1:745b0c9515]
@echo off
set /P C=shutdown -s -f -t
shutdown -s -f -t %C%
[/code:1:745b0c9515]
Now here comes the interesting part
If i double click the icon on the destop it opens a command window with the message, waits for input, i type a number and press enter and then the same message apears on the following line, i type again, press enter and the same thing happens. It doesn't work!!
If i enter in Total Commander go to the desktop dir and execute the same batch file!!! IT WORKS!!
IT IS THE EXACT SAME FILE!!! Can anyone give me a clue why this happens, or could you try it yourself to see if it is the same. I am using
Windows XP Professional, version2002, SP2
[/b]PS To add to the strangeness of this situation if i move the file from the desktop to another dir, and execute it from My Computer or from Total Commander it doesn't work in both cases.
I made the following batch file which shuts down the computer. I have to enter a number and then it waits that number of seconds till it shuts down, nothing fancy.
This is the source
[code:1:745b0c9515]
@echo off
set /P C=shutdown -s -f -t
shutdown -s -f -t %C%
[/code:1:745b0c9515]
Now here comes the interesting part
If i double click the icon on the destop it opens a command window with the message, waits for input, i type a number and press enter and then the same message apears on the following line, i type again, press enter and the same thing happens. It doesn't work!!
If i enter in Total Commander go to the desktop dir and execute the same batch file!!! IT WORKS!!
IT IS THE EXACT SAME FILE!!! Can anyone give me a clue why this happens, or could you try it yourself to see if it is the same. I am using
Windows XP Professional, version2002, SP2
[/b]PS To add to the strangeness of this situation if i move the file from the desktop to another dir, and execute it from My Computer or from Total Commander it doesn't work in both cases.