Reboot a machineTag(s): WSH VBScript

[reboot.vbs]

Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")

' win9x
WSHShell.Run _
  "C:\WINDOWS\RUNDLL32.EXE shell32.dll,SHExitWindowsEx 2", 2, false

' on NT, you can simply call REBOOT.EXE utility
' which is included with the NT resource KIT
' On XP, its the SHUTDOWN.EXE utility
WScript.Quit(0)



If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2012
[ home ]