I'm trying to get the syntax down for a run line.  I'm sure it has got to do with another set of parens or quotation marks, but I've tried quite a few scenarios with no luck.  It keeps bombing at the beginning of the answer file right after the quotation mark.  Here is the command line if you were to use it in a command prompt and it does work fine that way:

c:\temp\EXE filename /s /v /qn /f1"c:\temp\answer file name.iss"

Could anyone help with that?  Right now to work around the issue I just run a batch file from my vbs file.  My vbs file does a few other things prior to running this command, but I would like to have it all in the vbs file.  Thank you for your help!

0 Comments   [ - ] Hide Comments


Please log in to comment

Community Chosen Answer



Here is a fuction:

'Usage: Place the script in the same folder with exe file.

Launch_App "setup.exe", "/s /v /qn /f1""c:\temp\answer file name.iss""

Function Launch_App (strExePath, strArg)
Dim strScriptPath : strScriptPath = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\")-1)
Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")

WshShell.Run """" & strScriptPath & "\" & strExePath & """" & " " & strArg,,True

End Function


Answered 05/16/2013 by: terebent
Second Degree Brown Belt

Please log in to comment
Answer this question or Comment on this question for clarity



why do you use /v /qn with an answer file?


c:\temp\EXE filename /s /f1"c:\temp\answer file name.iss"

Answered 05/01/2013 by: SnowLyric
Second Degree Brown Belt

Please log in to comment

Commandline = chr(34) & "c:\temp\EXE_filename" & chr(34) & " /s /f1" & chr(34) & " c:\temp\answer file name.iss" & chr(34)
YEEAH = WshShell.Run(Commandline, 1, true)

Answered 05/02/2013 by: asman
Purple Belt

  • no space inside "c:\temp\answer file name.iss" ofc..
Please log in to comment