Solved

VBScript - run exe file while passing file

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
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 …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now