Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VBScript - run exe file while passing file

Posted on 2014-03-17
2
Medium Priority
?
1,228 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Hello again, all.  For those of you that have been following along, you'll know that this is my third article on this topic (though it is not Part III).  This article is sort of remedial, and probably the topic with which I should have started the s…
Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

636 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