views:

117

answers:

2

hello! i have a little problem... on win xp, if i write on commandline

shutdown -t 00 -r -f

the reboot works fine. but if i paste it, as is, in a bat file...the prompt show me an infinite loop. anyone can say me why?

thanks a lot for any suggestion :)

+2  A: 

What is the name of you batch file? I hope it's not shutdown.bat :)

If it is then I am afraid invoking shutdown -t 00 -r -f from within the batch file will call your batch file again instead of calling shutdown.exe and this goes on ad infinitum (since shutdown.bat is in the current dir and shutdown.exe is probably in the c:\windows\system32 directory)

SDX2000
+1  A: 

Did you name the file shutdown.bat by any chance? ... if so when you call shutdown it will call the .bat file and loop.

shutdown.EXE -t 0 -r -f 
Alex K.