Good morning,
I'm having trouble with Python when installing proprietary software. It's a specific type of software, with installers of different types (sometimes .exe, sometimes .msi) that also vary depending on the operating system. I want to use the `iswin64()` and `windows_version()` functions to identify which installer to use during deployment. My problem is this: it doesn't seem to identify the specific OS version and always chooses the installer for the Windows 7 x86 version (which is what happens in my "else" statement).
The problem seems to be coming from windows_version(), having already used iswin64() without any problems before.
Could you shed some light on the problem?
Thank you in advance for your answers.
Regards,
NeckAtSkin
Problem creating package with windows_version()
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
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
- sfonteneau
- WAPT Expert
- Messages: 2318
- Registered: July 10, 2014 - 11:52 PM
- Contact :
Your code looks correct.
You can add:
to check the version of the device.
In my opinion, the problem comes from the
Simon
You can add:
Code: Select all
print windows_version()In my opinion, the problem comes from the
Code: Select all
== -
neckatskin
- Messages: 14
- Registration: June 19, 2017 - 4:24 PM
Thank you, the "print" command did indeed point me in the right direction: I was able to see that my Windows 10 version was actually exactly 10.0.14393.
As you said, the "==" was therefore irrelevant. So I modified the first part, using ">=" for 10.0 for Win 10 and ">=" for Win7 x64 for ".
It works perfectly, thanks again for the help, problem solved
As you said, the "==" was therefore irrelevant. So I modified the first part, using ">=" for 10.0 for Win 10 and ">=" for Win7 x64 for ".
It works perfectly, thanks again for the help, problem solved
- sfonteneau
- WAPT Expert
- Messages: 2318
- Registered: July 10, 2014 - 11:52 PM
- Contact :
To complete the process,
you need to add the program's uninstall key to the `key` argument of `install_exe_if_needed`. It's currently empty
!
To retrieve the key:
https://www.wapt.fr/fr/doc/CreationPaqu ... stallation
Then add it as an argument to the `install_exe_if_needed` function
: https://www.wapt.fr/fr/doc/CreationPaqu ... -if-needed
you need to add the program's uninstall key to the `key` argument of `install_exe_if_needed`. It's currently empty
To retrieve the key:
https://www.wapt.fr/fr/doc/CreationPaqu ... stallation
Then add it as an argument to the `install_exe_if_needed` function
: https://www.wapt.fr/fr/doc/CreationPaqu ... -if-needed
