Peter said:
Win7 SP1
How do I turn off the computer after a certain
time.
shutdown -h 20:00
does not seem to work.
Does this have to be in the root directory?
There is no time parameter to the /h switch. Rerun "shutdown.exe /?"
and reread the description of that switch. The hibernate action occurs
immediately, not at some specified time.
There is the /t switch but that does not specify a time. It specifies
the delay, in seconds, to wait after running the shutdown.exe program to
allow it to commit its action.
So why not use the Task Scheduler already included with Windows? Define
an event to run the shutdown.exe program (with whatever switches you
want in its command line). There are lots of config options when using
Task Manager, like waiting to run the event until the computer has been
idle some specified number of minutes (so you don't rudely interrupt a
user's work and they lose any open documents). If you don't want to use
the GUI for Task Manager to create a scheduled event then use the
schtasks.exe command line program (yourself or in a batch file).