[SOLVED] Uninstall Key error

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.

March 11, 2020 - 10:31

Good morning,

I'm using a few packages that are reporting the following error in the audit:
ERROR: Uninstall Key is not in Windows Registry.
In some packages the Uninstall Key is indeed missing and I correct them to eliminate the error.

For other packages, the Uninstall Key does not exist because in some cases they are uninstallation packages, but the error is still displayed.

Is there a way to clear this error by "neutralizing" the Uninstall Key?

THANKS.

Patrice
WAPT 1.7.4
User avatar
jpele
Messages: 156
Registration: March 4, 2019 - 12:01
Location: Nantes

March 11, 2020 - 11:38

Hello,
Could you please show us the "setup.py" file of an affected uninstallation package?

Regards,
Jimmy
Patrice_minagri
Messages: 57
Registration: Oct 21, 2016 - 4:56 p.m.

March 11, 2020 - 2:48 PM

Hello Jimmy,

Here is the code:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = ['']

def install():
    mercure_soft = 'mercureVPN-gui-1.0.9b-fr.exe'
    DirMercure =  makepath(programfiles32,'Mercure VPN','Uninstall.exe')

    # On teste si Mercure VPN est installé
    for soft in installed_softwares(u'Mercure VPN 1.1b'):
        # Si le processus de Mercure VPN est lancé on le tue
        if isrunning(mercure_soft):
            print ("closing %s" % mercure_soft)
            killalltasks(mercure_soft)

        # Désinstallation par la clé
        print('desinstallation de Mercure VPN')
        run(r'"%s" /S' % DirMercure)
Could the problem stem from the quotes that exist in uninstallkey = [''] ?
WAPT 1.7.4
User avatar
vcardon
WAPT Expert
Messages: 278
Registration: Oct 06, 2017 - 10:55 p.m.
Location: Nantes, France

March 11, 2020 - 3:40 PM

Patrice_minagri wrote: March 11, 2020 - 2:48 PM Hello Jimmy,

Here is the code:
# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = ['']

def install():
mercure_soft = 'mercureVPN-gui-1.0.9b-fr.exe'
DirMercure = makepath(programfiles32,'Mercure VPN','Uninstall.exe')

# We test if Mercure VPN is installed
for soft in installed_softwares(u'Mercure VPN 1.1b'):
# If the Mercure VPN process is running, we kill it
if isrunning(mercure_soft):
print("closing %s" % mercure_soft)
killalltasks(mercure_soft)

# Uninstall using the key
print('uninstalling Mercure VPN')
run(r'"%s" /S' % DirMercure)
Could the problem stem from the quotes that exist in uninstallkey = [''] ?
Hello Patrice

There might also be a problem with your script.

You install and then uninstall your software, using the same procedure "def install():"

So, since the package is correctly deployed and executed, it reports that the UninstallKey is missing because you uninstalled the software right after installing it.

In my opinion, if you go to a workstation, you should see that the Mercure software is not installed, but it is marked as green in your console with an audit in red.

Sincerely.

Vincent
Vincent CARDON
Tranquil IT
User avatar
jpele
Messages: 156
Registration: March 4, 2019 - 12:01
Location: Nantes

March 11, 2020 - 3:42 PM

Patrice_minagri,

there's a good chance the "uninstallkey = []" function should remain blank.
Please retest with this single change, and if the error persists, please send us the return logs.

Regards,
Jimmy
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

March 12, 2020 - 6:36 PM

vcardon wrote: March 11, 2020 - 3:40 PM
Patrice_minagri wrote: March 11, 2020 - 2:48 PM Hello Jimmy,

Here is the code:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = ['']

def install():
    mercure_soft = 'mercureVPN-gui-1.0.9b-fr.exe'
    DirMercure =  makepath(programfiles32,'Mercure VPN','Uninstall.exe')

    # On teste si Mercure VPN est installé
    for soft in installed_softwares(u'Mercure VPN 1.1b'):
        # Si le processus de Mercure VPN est lancé on le tue
        if isrunning(mercure_soft):
            print ("closing %s" % mercure_soft)
            killalltasks(mercure_soft)

        # Désinstallation par la clé
        print('desinstallation de Mercure VPN')
        run(r'"%s" /S' % DirMercure)
Could the problem stem from the quotes that exist in uninstallkey = [''] ?
Hello Patrice

There might also be a problem with your script.

You install and then uninstall your software, using the same procedure "def install():"

So, since the package is correctly deployed and executed, it reports that the UninstallKey is missing because you uninstalled the software right after installing it.

In my opinion, if you go to a workstation, you should see that the Mercure software is not installed, but it is marked as green in your console with an audit in red.

Sincerely.

Vincent
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