Tuesday, March 31, 2009

Rebooting a computer (VBS)

The script shown in this post pops up a message to the current logged-in user informing him that a reboot is required.




The user has the option to proceed with the reboot or he can choose to click the "No" button and abort the reboot. Clicking "Yes" will invoke the ShutMeDown procedure which uses the .Reboot method to reboot the computer. Clicking "No" will display the following pop-up:



Not clicking on either the "Yes" or "No" after 60 seconds will abort the script from continuing.



For what possible situations can this script be used? Follow the discussing from the following thread in The Official Scripting Guys Forum on Technet:

http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/65e8699f-fca4-4e08-a181-8b621acbf963

2 comments:

Anonymous said...

Where is that OK button? ;)

Badz Manaois said...

Hehe, sharp eyes! Let it be, those who would find a use for this script should debug it themselves. =)