shut down

  • Thread starter Thread starter JB
  • Start date Start date
J

JB

Hey
Is there a way of scheduling windows (XP) to shut down the machine at a
certain time?
Say every night at midnight
Thanks
 
Yes.
Create shutdown.bat file with notepad, save to c:\ ,
with the following command

"%windir%\system32\shutdown.exe -s -t 00" (no quotes)

Then just schedule that


All running programs will also be shutdown with no chance for saving etc..
(except badly behaved ones) might be stuck in the middle of shutdown with
the dialog box of "This prog has not responded ..yada, yada"..




--
Tumppi
=================================
Most learned on these newsgroups
Helsinki, FINLAND
(translations from/to FI not always accurate
=================================
 
Hi,

I agree with Thomas that shutdown.exe is a good tool and you can run
shutdown.exe directly for more information about the switch. However,
please note, if you use -t as a switch, it is set the timeout to XX seconds.

Thanks.


Best regards,

Vincent Xu
Microsoft Online Partner Support

======================================================
Get Secure! - www.microsoft.com/security
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others
may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties,and confers no rights.
======================================================



--------------------
 
hope you're still there. I was away for a while
thanks for your reply. Thing is I've never done this before so want to get
it right.
What I understood is:
in notepad type
"%windir%\system32\shutdown.exe -s -t 00" (without the quotes) and save
it to c:

are the % representing something or is that what I type?
the 00, is that meant to be midnight?

sorry for the stupid questions.
J
 
Thanks for your reply. I didn't understand what you meant as a 'switch'
or the timeout thing.
when you say you can run shutdown.exe directly, how do you mean?
J
 
....switch = as in additional commands/parameters to the program called
first...

for example this shutdown row:
%windir%\system32\shutdown.exe -s -t 00

%windir" where windows is installed (XP and Win98/ME
usually in c:\windows,
WinNT in C:\WINNT (just use %windir%, so
it's always found)

-s parameter/command passed to shutdown.exe,
meaning shutdown
could be -r , for
reboot

-t 00 execute command after how many seconds....






--
Tumppi
=================================
Most learned on these newsgroups
Helsinki, FINLAND
(translations from/to FI not always accurate
=================================
 
Hi,

Yep, maybe I should use parameters to avoid any conflicts.My fault.

Now, how is everything going? JB, let me know if you still have concerns.

Have a good day!

Best regards,

Vincent Xu
Microsoft Online Partner Support

======================================================
Get Secure! - www.microsoft.com/security
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others
may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties,and confers no rights.
======================================================



--------------------
 
Hi J,

%windir% means the windows directory, you can just type %windir%. the 00 at
last indicates the interval before you want to shutdown. If you use 10
instead of 00, it means you want to shutdown after 10 seconds.

Hope this helps.


Best regards,

Vincent Xu
Microsoft Online Partner Support

======================================================
Get Secure! - www.microsoft.com/security
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others
may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties,and confers no rights.
======================================================



--------------------
 
Back
Top