|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| 11/01/2009 at 06:21AM PST, ID: 24861793 | Points: 500 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: |
Dim objWMI, colOpSys, opSys
Set objWMI = GetObject("winmgmts:{impersonationLevel=impersonate,(Debug,Shutdown)}")
For Each opSys In objWMI.InstancesOf("Win32_OperatingSystem")
intRet = opSys.Win32Shutdown(2+4,0)
If intRet <> 0 Then
WScript.Echo "Error attempting reboot: " & intRet
End If
Next
|
Advertisement