Create a text file named reboot.vbs and paste in the text below.
------------------------------------
Set colOperatingSystems = GetObject_
("winmgmts:{(Shutdown)}").ExecQuery("Select * from
Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Win32Shutdown(1)
Next
------------------------------------
Create a text file named logoff.vbs and paste in the text below.
------------------------------------
Set colOperatingSystems = GetObject_
("winmgmts:{(Shutdown)}").ExecQuery("Select * from
Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Win32Shutdown(0)
Next
reboot.vbs should have been;
------------------------------------
Set colOperatingSystems = GetObject_
("winmgmts:{(Shutdown)}").ExecQuery("Select * from
Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Win32Shutdown(2)
Next
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.