PDA

View Full Version : Shutdown Script


PC
January 7th 04, 12:09 PM
I know this is probably a basic question, so please forgive me. I want to
shut my XP Pro machine down at 11pm BUT leave my UPS on. Does anyone know
of a script that can shut the machine down at a specific time?

PC

BC
January 7th 04, 12:09 PM
PC, Fri, 5 Sep 2003 09:23:57 -0000:

> I know this is probably a basic question, so please forgive me. I want to
> shut my XP Pro machine down at 11pm BUT leave my UPS on. Does anyone know
> of a script that can shut the machine down at a specific time?
>
> PC

Use sheduled tasks in Control Panel to run windows\system32\shutdown.exe at
that time. In the properties of the task add -s to the end of the command,
e.g. C:\WINDOWS\system32\shutdown.exe -s, which will cause a shutdown.

You can further customise this by adding a message to display when shutting
down and setting the time given before shutdown (to allow work to be saved
etc). Type "shutdown" at a command prompt for details.

Doug Knox MS-MVP
January 7th 04, 12:09 PM
Copy and paste the following into a Notepad file and save it with a VBS
extension. Then create a Shceduled Task that points to the VBS file you
created.

WMIQuery = "select * from Win32_OperatingSystem where Primary=true"
Set OpSysSet
=GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery(WMIQuery)

For Each OpSys in OpSysSet
OpSys.Shutdown()
Next

There are 5 lines in the above code, so make sure nothing wraps.
--
Doug Knox, MS-MVP Windows XP/ Windows Smart Display
Win 95/98/Me/XP Tweaks and Fixes
http://www.dougknox.com
--------------------------------
Associate Expert
ExpertZone - http://www.microsoft.com/windowsxp/expertzone
--------------------------------
Please reply only to the newsgroup so all may benefit.
Unsolicited e-mail is not answered.

"PC" > wrote in message
...
> I know this is probably a basic question, so please forgive me. I want to
> shut my XP Pro machine down at 11pm BUT leave my UPS on. Does anyone know
> of a script that can shut the machine down at a specific time?
>
> PC
>
>

fyer
January 7th 04, 12:11 PM
type shutdown/? in cmd

Google