Hot restart

  • Thread starter Thread starter Microsoft
  • Start date Start date
M

Microsoft

Wanting to restart the machine at 3:45am (task scheduler)
with the following command line: (no quotes)
"C:\WINDOWS\RUNDLL32.EXE SHELL32.DLL,SHExitWindowsEx 2"
it worked on WIN ME
Wont run on WIN 2000.

What parameter do I need to get the machine
to restart, rather than shut-down?

Any help would be appreciated.
Thanks

(I previously ran a similar query for WIN ME in another group)
 
This VBScript should work. Use task scheduler to schedule it.

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Shutdown)}!\\.\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Reboot()
Next
 
Back
Top