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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running a program

Status
Not open for further replies.
Sep 12, 2002
282
SG
hi,
how can i start a .exe program using .vbs ?
thanks
 
Try something like this:
Code:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "\path\to\prog.exe arg1 arg2 ... argN"
The syntax:
object.Run strCommand, intWindowStyle, bWaitOnReturn

Hope This Help
PH.
 
thanks PHV..
how can i find out what are the methods (eg. run) that can be used with WshShell ??
 
Feel free to read the FAQ...
Dilettante has responded here: faq329-3578


Hope This Help
PH.
 
thanks...
btw, do you have a script that allow me to check whether a specific hotfix
is installed on 100 computers?
 
do you know why
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "\path\to\prog.exe arg1 arg2 ... argN"

runs when i double click on the .vbs file
but doesn't run when i use it as a logon script?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top