Hello,
I would like to retrieve the version number of the WAPT package installed for software deployed on a machine (for use in the install() function of the new package version). Do you know how to do this?
[SOLVED] Retrieve the version of a WAPT package installed on a machine
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 :
To clarify the question:
Do you want to retrieve the currently installed software version?
Do you want to retrieve the version of the package you are currently installing?
Do you want to retrieve the previous version of the installed package?
Simon
Do you want to retrieve the currently installed software version?
Do you want to retrieve the version of the package you are currently installing?
Do you want to retrieve the previous version of the installed package?
Simon
Hello Simon,
I would like to retrieve the version number of the package that is already installed on the machine (so in principle the previous version, but depending on the case there may be an additional increment), not the version number of the package that will be installed.
(Being able to retrieve the version of the software already installed would also be useful.)
I would like to retrieve the version number of the package that is already installed on the machine (so in principle the previous version, but depending on the case there may be an additional increment), not the version number of the package that will be installed.
(Being able to retrieve the version of the software already installed would also be useful.)
WAPT Enterprise 2.6.1.17765
WAPT server under Debian 13
Administration/package creation under Windows 11/10
WAPT server under Debian 13
Administration/package creation under Windows 11/10
- sfonteneau
- WAPT Expert
- Messages: 2318
- Registered: July 10, 2014 - 11:52 PM
- Contact :
To retrieve the software version (i.e., what appears in appwiz.cpl):
The advantage is that we can see what is installed regardless of whether it was installed by Wapt or not
Otherwise :
To retrieve the currently installed version, although I admit I've never used it, I always use the first method
Code: Select all
>>> installed_softwares('chrome')
[{'key': '{5F34DD8E-A9AA-35DA-A38D-EBB349D86957}', 'name': 'Google Chrome', 'version': '111.0.5563.111', 'install_date': '2023-03-21 00:00:00', 'install_location': '', 'uninstall_string': 'MsiExec.exe /X{5F34DD8E-A9AA-35DA-A38D-EBB349D86957}', 'publisher': 'Google LLC', 'system_component': 0, 'win64': True}]Otherwise :
Code: Select all
for p in WAPT.installed(include_errors=True):
if control.package == p.package:
print(p.version)
Thank you.
Sorry for the question about the software version; I haven't used the `installed_softwares()` function yet and hadn't realized it could return the software version.
Regarding the package version, a network of workstations might have the same software version but different installed package versions (some workstations not having the latest package installed). Therefore, the update process can vary depending on whether a workstation has the latest package version installed or an earlier one. Rather than testing the changes made by the latest installed package, it seemed simpler and faster to retrieve this information and then condition the installation of the new package version based on the installed package version.
With your guidance, I understand how to retrieve the installed package version from the workstation's database (the 'version' field provides the software version associated with the package version).
Sorry for the question about the software version; I haven't used the `installed_softwares()` function yet and hadn't realized it could return the software version.
Regarding the package version, a network of workstations might have the same software version but different installed package versions (some workstations not having the latest package installed). Therefore, the update process can vary depending on whether a workstation has the latest package version installed or an earlier one. Rather than testing the changes made by the latest installed package, it seemed simpler and faster to retrieve this information and then condition the installation of the new package version based on the installed package version.
With your guidance, I understand how to retrieve the installed package version from the workstation's database (the 'version' field provides the software version associated with the package version).
WAPT Enterprise 2.6.1.17765
WAPT server under Debian 13
Administration/package creation under Windows 11/10
WAPT server under Debian 13
Administration/package creation under Windows 11/10
- dcardon
- WAPT Expert
- Messages: 1932
- Registration: June 18, 2014 - 09:58
- Location: Saint Sébastien sur Loire
- Contact :
Thanks Brice for the feedback. 
I'm marking the topic as resolved,
Denis
I'm marking the topic as resolved,
Denis
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
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
