I'm trying to schedule a shutdown with a batch file and task scheduler. The problem is the command (shutdown -s -f) runs wiht no problems on the command line, but not in the batch file. It keeps repeating the command, but wiht no results.
Rather than running it in a batchfile, have you tried running the command directly from the scheduler? Either as shutdown -s -f or c:\winnt\system32\shutdown.exe -s -f
Hmm, tried that last night, using shutdown /h /f, didn't work, but after a bit of checking found out hibernation does not work when ras is enabled, bugger!
It doesn't work either.. and hibernation is turned off. The batch didn'd work even when ran directly. It does now, but only with the CALL command before the shutdown -s -f, but not when scheduled.
only thing I can think of now is to call a script from the schedule to open the command prompt and 'type' the command in as if you were typing it yourself. That should work, although I have not had time to try this myself, and I'll be aay from the computer for a while.
no problem in batch or to run the batch in shedular... in shedelur i had to give an username en password to run the batch file. Administrator login + pass and it's ok.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.