Page 1 of 1

Help with installation settings

Published: October 19, 2017 - 10:26 AM
by Arsgunner
Good morning,

I'm trying to install the SphinxIQ2 software. The developer provides a utility that generates a batch file for a silent installation. I tried copying the parameters from my setup.py file; they correspond to the silentflags section in the line below:

Code: Select all

install_exe_if_needed("SetupSphinxIQ2.exe",silentflags='/s /v"/qn INSTALLDIR=\"C:\Program Files\SphinxIQ\"" /v"ISSCRIPTCMDLINE=\"MaCléDeLicence\""',key='SphinxIQ2',min_version='7.2.3.0')
I'm still a beginner with WAPT; this must be my third package, and I don't have any particular knowledge of Python. I imagine it's misinterpreting the command, but I can't see what the problem is. I tried removing the quotation marks, which seemed unnecessary, but without success.

The error message is below:

Code: Select all

Message	File Name	Line	Position	
Traceback				
    <module>	c:\wapt\wapt-get.py	23		
    main	c:\wapt\wapt-get.py	373		
    install_wapt	c:\wapt\common.py	3630		
"CalledProcessErrorOutput: Command '""SetupSphinxIQ2.exe"" /s /v""/qn INSTALLDIR=""C:\\Program Files\\SphinxIQ"""" /v""ISSCRIPTCMDLINE=""-MacléDeLicence""""' returned non-zero exit status 1203.
Output:u''"				
Thank you for your help

Re: Help with installation settings

Published: Dec 19, 2017 - 7:48 PM
by dcardon
Be careful with backslashes (\) in strings. By default, it's an escape character in Python, as in many other languages. You must either escape it by doubling it (\\) or put an 'r' before the string. The 'r' tells Python to interpret the string as a regular expression, and then backslashes are no longer interpreted.

If you manage to get an installation string working in a cmd.exe command, you can try it in a run() function before attempting install_exe_if_needed(). In Python, it's possible to define a string with triple quotes: """string""". This allows you to have both single and double quotes within it.