Jump to Real's How-to Main page

Execute external programs

[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)

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

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