Turn off compter automatically.

P

Peter Jason

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?

Peter
 
T

tumppiw

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?

Peter

The format is shutdown -? -t xxx

where ? is s=shutdown , r=reboot and h=hibernate
and -t xxx is time to shutdown in seconds up to 10 years...
try (in command prompt) shutdown -?

--
 
V

VanguardLH

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top