Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to execute an windows program from vb script?

Status
Not open for further replies.

yogesh

Programmer
Jun 22, 2000
14
0
0
US
Hi guys , Can any one of u tell me how to execute windows executable(.exe) program from vb script .
I am want to execute Internet Explorer.
Help will be highly appreciated..
Thanks in advance
 
dim WshShell, _
ExecCmd, _
RetVal

Set WshShell = wscript.CreateObject("Wscript.Shell")
ExecCmd = "c:\Program Files\Internet Explorer\IEXPLORE.EXE"
RetVal = WshShell.run(ExecCmd,,false)

false in the above statement will wait until IE closes before the rest of the script runs. If you set that to true, your script will continue running.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top