dim OpSysSet
dim Obj
rem 0 = 16 = RELOGIN FORCE
rem 8 = SHUTDOWN
rem 4 = RELOGIN
rem 2 = 6 = REBOOT
rem 1 = 5 = FORCE (hand shutdown)
Set OpSysSet = GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}//./root/cimv2").ExecQuery _
("SELECT * FROM Win32_OperatingSystem WHERE Primary=true")
For Each Obj In OpSysSet
Obj.Win32Shutdown(6)
Next
Ответов: 23
Рейтинг: 0
|
|||
to Старый чайник: а скриптом не удобнее?
|
|||
карма: 0 |
|