Shell("shutdown.exe -s -t 00")
Private Sub ShutDown()
Dim objWMIService As Object, colOperatingSystems As Object, ObjOperatingSystem As Object
objWMIService = GetObject("winmgmts:{(Shutdown)}")
colOperatingSystems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
For Each ObjOperatingSystem In colOperatingSystems
ObjOperatingSystem.Win32Shutdown(1)
Next
End Sub
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 51