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)

blog comments powered by Disqus