Help with installation settings

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
Arsgunner
Messages: 21
Registration: Oct 06, 2017 - 4:04 p.m.

October 19, 2017 - 10:26

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
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

December 19, 2017 - 7:48 PM

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.
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Locked