Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic Shutdown - Windows 2000 Pro

Status
Not open for further replies.

trussman

Technical User
Feb 19, 2004
142
US
i was wondering if it ws possible to set a scheduled taks or something to automatically shutdown the computer. I don't want to put it in hibernation or power down like a screen saver. I want it to actually shutdown as if I went to Start, and Shutdown.

Thanks for any help.
 
copy and paste the following code into a file, name it sth like shutdown.vbs :

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

for each OpSys in OpSysSet
OpSys.Shutdown()
next




just let the scheduler run the vbs at a certain time.

rgds,

R.
 
Ok it worked. But it comes up with the windows screen stating it is ok to shutdown the computer. Is there a ways to get it to shutdown completely?
 
We use a program called "Shutdown". From:
You can setup a task using Windows Scheduler to run the shutdown.exe file and it's flags (as needed).

This will shut down your machine (or reboot or log off) no matter what is going on.

CJ

Don't drink and post, save that for driving home!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top