Solved

VBScript - run exe file while passing file

Posted on 2014-03-17
2
1,069 Views
Last Modified: 2014-03-18
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
Comment
Question by:JamieD71
2 Comments
 
LVL 7

Expert Comment

by:COACHMAN99
ID: 39934675
paste your string into a .bat or .vbs (depending on what you want to do.
0
 
LVL 13

Accepted Solution

by:
Santosh Gupta earned 500 total points
ID: 39934680
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question