Empty package to uninstall an application

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
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

March 22, 2018 - 6:17 PM

Code: Select all

def install():
    print('uninstalling Foxit Reader')
    for soft in installed_softwares('Foxit Reader'):
            run(WAPT.uninstall_cmd(soft['key']))

    for soft in installed_softwares('Foxit Reader'):
            error("Wapt find : %s" % soft)     
benoitpatin
Messages: 37
Registration: February 21, 2018 - 5:05 PM

March 23, 2018 - 10:37

It's still not working.
However, this time I have an error in the Tasks/Errors tab of the console:

Code: Select all

Installing adv-Foxi-Reader-Uninstall
Installing 4C4C4544-0058-3410-8058-B3C04F304732
Exception: Erreur lors de l'installation de 4C4C4544-0058-3410-8058-B3C04F304732 (=33): erreurs dans les paquets [[u'adv-Foxi-Reader-Uninstall', PackageEntry('adv-Foxi-Reader-Uninstall','0-0') ], [u'4C4C4544-0058-3410-8058-B3C04F304732 (=33)', PackageEntry('4C4C4544-0058-3410-8058-B3C04F304732','33') ]]
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\waptservice\waptservice.py", line 1150, in run
    self.running_task.run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 408, in pwrapper
    return func(*arg, **kwargs)
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 467, in run
    self._run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 887, in _run
    self.result.get('errors',[])))
Exception: Erreur lors de l'installation de 4C4C4544-0058-3410-8058-B3C04F304732 (=33): erreurs dans les paquets [[u'adv-Foxi-Reader-Uninstall', PackageEntry('adv-Foxi-Reader-Uninstall','0-0') ], [u'4C4C4544-0058-3410-8058-B3C04F304732 (=33)', PackageEntry('4C4C4544-0058-3410-8058-B3C04F304732','33') ]]
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

March 23, 2018 - 2:04 PM

You need to send us the error message from your console when you click on the faulty package!
benoitpatin
Messages: 37
Registration: February 21, 2018 - 5:05 PM

March 23, 2018 - 2:23 PM

The error is the one I put in my previous message.
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

March 30, 2018 - 8:30 PM

Good evening Benoit,
benoitpatin wrote: March 23, 2018 - 2:23 PM The error is the one I put in my previous message.
If the purpose of a package is to uninstall an application, the uninstallkey should not be specified, otherwise the package will inevitably fail because WAPT checks at the end of the def install() function that the uninstallkey is indeed present in the registry.

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
benoitpatin
Messages: 37
Registration: February 21, 2018 - 5:05 PM

April 4, 2018 - 11:50 AM

dcardon wrote: March 30, 2018 - 8:30 PM Good evening Benoit,
benoitpatin wrote: March 23, 2018 - 2:23 PM The error is the one I put in my previous message.
If the purpose of a package is to uninstall an application, the uninstallkey should not be specified, otherwise the package will inevitably fail because WAPT checks at the end of the def install() function that the uninstallkey is indeed present in the registry.

Denis
Hi Denis!

Okay, so I removed the value of "uninstallkey".
However, can you confirm how to write the uninstallkey in the run command?

run(WAPT.uninstall_cmd(soft['Foxit Reader_is1']))
run(WAPT.uninstall_cmd(soft'{Foxit Reader_is1}'))

THANKS
benoitpatin
Messages: 37
Registration: February 21, 2018 - 5:05 PM

April 4, 2018 - 1:42 PM

Code: Select all

def install():
    print('uninstalling Foxit Reader')
    for soft in installed_softwares('Foxit Reader'):
        run(WAPT.uninstall_cmd(soft['Foxit Reader_is1']))

Code: Select all

uninstalling Foxit Reader
KeyError: 'Foxit Reader_is1'
No matter what I put in run, I always get an error.
Couldn't we use the Uninstallstring instead?
Locked