Share this page 

Execute external programsTag(s): WSH VBScript


[run.vbs]

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

' open maximized and wait
WSHShell.Run "notepad.exe", 3, true 
' open minimized and wait
WSHShell.Run "notepad.exe", 2, true 
' open normal and don't wait
WSHShell.Run "notepad.exe", 1, false

Set WSHShell = Nothing
WScript.Quit(0)