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)



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 ]