Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem Running switches with executable - need assistance

Status
Not open for further replies.

pghTech

Technical User
Jul 19, 2006
37
US
I am trying to run a program that has switches involved that I can successfully run from the "Run" window in Windows XP.

Example:
c:\temp\inst\InstData\VM\install.exe -f installer.properties

However, when putting this into VBScript like I normally do such as:

Code:
objShell.run """c:\temp\inst\InstData\VM\install.exe""" & " -f " & "installer.properties"

It just wants to run the installer but not the switches.

NOTE: This is all one line - forum is moving the last segment onto the second line.
Any suggestions?
 
I believe your code should look like this.

Code:
objShell.run "c:\temp\inst\InstData\VM\install.exe" & " -f " & "installer.properties"

hope this helps.

Thanks

John Fuhrman
Titan Global Services
 
You perhaps have to provide the full pathname ?
objShell.Run """c:\temp\inst\InstData\VM\install.exe"" -f ""\path\to\installer.properties"""

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top