View Full Version : Batch File for timed shutdown
Adrian
December 5th 03, 10:37 PM
Can anyone help.
Is there a batch file or a commanf that will shut XP professional down at a
given time that you can specify. I ask because I do long downloads into the
night and I wnat the ability to shut down automatically
Thanks
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 11/09/2003
Jose Francisco
December 5th 03, 10:37 PM
Greetings Adrian,
Have you tried using Scheduled Tasks?
Regards,
Jose Francisco
--
Still Got Problems? Email Me!
*Note* Always do a Windows Update
http://www.betaconnect.com
"Adrian" > wrote in message
...
> Can anyone help.
>
> Is there a batch file or a commanf that will shut XP professional down at
a
> given time that you can specify. I ask because I do long downloads into
the
> night and I wnat the ability to shut down automatically
>
> Thanks
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.518 / Virus Database: 316 - Release Date: 11/09/2003
>
>
Ramesh
December 5th 03, 10:37 PM
Adrian,
Use Task Scheduler to schedule the computer to shut down and restart at a
specific time.
To do so, follow these steps:
01. Click Start, and then click Control Panel.
02. Click Performance and Maintenance, and then click Scheduled Tasks.
03. Double-click Add Scheduled Task. The Scheduled Task Wizard starts.
04. Click Next.
05. Under Click the program you want Windows to run, click Browse.
06. In the Select Program to Schedule dialog box, locate the
%SystemRoot%\System32 folder, locate and click the Shutdown.exe file, and
then click Open.
07. Under Perform this task, specify a name for the task and how frequently
you want this task to run, and then click Next.
08. Under Select the time and day you want this task to start, specify a
start time and date for the task, and then click Next.
09. Type the user name and password to run this task under, and then click
Next.
10. Click to select the Open advanced properties for this task when I click
Finish check box, and then click Finish.
11. Click the Task tab.
12. In the Run box, specify any additional parameters that you want to use
with Shutdown.exe.
13. Click OK.
NOTE: For exact parameters for shutdown.exe, open a DOS window and type
"shutdown.exe /?"
--
Regards,
Ramesh
"Adrian" > wrote in message
...
Can anyone help.
Is there a batch file or a commanf that will shut XP professional down at a
given time that you can specify. I ask because I do long downloads into the
night and I wnat the ability to shut down automatically
Thanks
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 11/09/2003
Doug Knox MS-MVP
December 5th 03, 10:37 PM
Use the following WMI Script. Copy and paste all 5 lines into a Notepad
file and save it with a VBS extension:
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
Note: the second line goes from Set OpSysSet to (WMIQuery), in case it
wraps. Then create a scheduled task to run the script.
--
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.
"Adrian" > wrote in message
...
> Can anyone help.
>
> Is there a batch file or a commanf that will shut XP professional down at
a
> given time that you can specify. I ask because I do long downloads into
the
> night and I wnat the ability to shut down automatically
>
> Thanks
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.518 / Virus Database: 316 - Release Date: 11/09/2003
>
>
vBulletin® v3.6.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.