Page 1 of 1

[RESOLVED] Software uninstallation package

Published: May 20, 2022 - 11:51
by Benjamin T
Hello community,

When trying to update Edupython, I noticed that version 3.0 was installed over version 2.7 without uninstalling it. As a result, the Python engine wasn't updated correctly, leading to numerous errors. Therefore, I want to create a package to uninstall Edupython 2.7 (which wasn't installed via Wapt).
After some searching on the forum, here is my code snippet

Code: Select all

uninstallkey = ['EduPython_2.7_is1']

def install():
    for soft in installed_softwares('EduPython'):
        if Version(soft['version']) < Version('3.0'):
                run(WAPT.uninstall_cmd(soft['key']))
This one works correctly but an error appearsFATAL ERROR: EWaptException: The uninstall key: EduPython_2.7_is1 has not been found in system registry after software installation"which seems logical with def install.

Do you have any ideas on how to prevent my package from showing an error?

Re: Software uninstallation package

Published: May 20, 2022 - 1:59 PM
by sfonteneau
Why did you leave:

Code: Select all

uninstallkey = ['EduPython_2.7_is1']
You can leave it blank

Code: Select all

uninstallkey = []

Re: Software uninstallation package [RESOLVED]

Published: May 20, 2022 - 2:34 PM
by Benjamin T
Ah yes, quite simply :? ... Thank you for the quick response!