[SOLVED] Problem with multiple 'Key' entries related to a software

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
Patrice_minagri
Messages: 57
Registration: Oct 21, 2016 - 4:56 p.m.

January 14, 2019 - 2:57 PM

Good morning,

When I run the line installed_softwares('BIG-IP Edge Client'), I get the following result:

Code: Select all

[{'install_date': '',
  'install_location': u'C:\\Windows\\Downloaded Program Files',
  'key': u'F5 Networks Client Components',
  'name': u'BIG-IP Edge Client Components (All Users)',
  'publisher': u'F5 Networks, Inc.',
  'system_component': 0,
  'uninstall_string': u'"C:\\ProgramData\\F5 Networks\\f5unistall.exe" /uninstall',
  'version': u'71.2018.0808.2011'},
 {'install_date': u'20190114',
  'install_location': u'',
  'key': u'{6D4839CB-28B4-4070-8CA7-612CA92CA3D0}',
  'name': u'BIG-IP Edge Client',
  'publisher': u'F5 Networks, Inc.',
  'system_component': 0,
  'uninstall_string': u'MsiExec.exe /X{6D4839CB-28B4-4070-8CA7-612CA92CA3D0}',
  'version': u'71.2018.0808.2011'}]
In fact, this is quite normal because the name 'BIG-IP Edge Client' is mentioned twice in the list of software installed on Windows, namely:
- 'BIG-IP Edge Client'
- 'BIG-IP Edge Client Components (All Users)'

When I run the following code:

Code: Select all

for soft in installed_softwares('BIG-IP Edge Client'):
           key_uninst = soft['key']
The result is: F5 Networks Client Components

What I'm interested in retrieving is the second reference key, which is: {6D4839CB-28B4-4070-8CA7-612CA92CA3D0}

How can I retrieve it? Is it possible to limit the search to the mention of 'BIG-IP Edge Client'?

THANKS.

Patrice
WAPT 1.7.4
User avatar
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

January 14, 2019 - 3:05 PM

Code: Select all

installed_softwares(uninstallkey=u'{6D4839CB-28B4-4070-8CA7-612CA92CA3D0}')
Tranquil IT
Patrice_minagri
Messages: 57
Registration: Oct 21, 2016 - 4:56 p.m.

January 14, 2019 - 3:13 PM

And assuming the key isn't known and we want to use the registry variable instead.

Because in my case, the code `installed_softwares('BIG-IP Edge Client')` will always return two results? Is that correct? Is

n't there anything that can search specifically for 'BIG-IP Edge Client' without retrieving the properties of 'BIG-IP Edge Client Components (All Users)'?
WAPT 1.7.4
User avatar
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

January 14, 2019 - 4:10 PM

There's a small bug in the function... to work around it, uninstallkey=''

Code: Select all

installed_softwares(uninstallkey='',name=r'BIG-IP Edge Client')
Tranquil IT
Locked