Solved

VBScript - run exe file while passing file

Posted on 2014-03-17
2
1,093 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 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

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

733 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