Вверх ↑
Ответов: 23
Рейтинг: 0
#1: 2006-09-05 03:32:21 ЛС | профиль | цитата
to Старый чайник: а скриптом не удобнее?

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
карма: 0

0