Page 1 of 1

[SOLVED] Uninstall Key error

Published: March 11, 2020 - 10:31
by Patrice_minagri
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

Re: Uninstall Key error

Published: March 11, 2020 - 11:38
by jpele
Hello,
Could you please show us the "setup.py" file of an affected uninstallation package?

Regards,
Jimmy

Re: Uninstall Key error

Published: March 11, 2020 - 2:48 PM
by Patrice_minagri
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 = [''] ?

Re: Uninstall Key error

Published: March 11, 2020 - 3:40 PM
by vcardon
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

Re: Uninstall Key error

Published: March 11, 2020 - 3:42 PM
by jpele
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

Re: Uninstall Key error

Published: March 12, 2020 - 6:36 PM
by dcardon
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