• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1283
  • Last Modified:

VBScript - run exe file while passing file

Hi Experts,

I hope someone can help with what is likely to be a simple query...  I am looking for a vbscript to call an exe file and then pass an xml file...  The following works very well from the command line...

C:\Program Files\AI\app.exe /config "C:\Program Files\AI\initial config.xml"

Thanks for your help!
0
JamieD71
Asked:
JamieD71
1 Solution
 
COACHMAN99Commented:
paste your string into a .bat or .vbs (depending on what you want to do.
0
 
Santosh GuptaCommented:
Try below...

Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run """C:\Program Files\AI\app.exe""/config /wait ""C:\Program Files\AI\initial config.xml""", 1, True
Set objShell = Nothing

Open in new window

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now