Page 1 of 1

[SOLVED] 7-Zip 23.1 uninstallation error

Published: August 2, 2023 - 3:09 PM
by eliottiph
WAPTConsole Enterprise version 2.2.1.11957
Console: Win19 server
SRV: Debian 11
Test machine: Windows 10 22H2

Good morning,

I encountered an error while uninstalling 7zip version 23.1.

The package uninstalls successfully, but gives this error in the console:

Code: Select all

Waiting for the removal of key: 7-Zip from Windows registry
[WinError 5] Accès refusé: 'C:\\Program Files\\7-Zip\\7-zip.dll'
Traceback (most recent call last):
  File "shutil.py", line 616, in _rmtree_unsafe
PermissionError: [WinError 5] Accès refusé: 'C:\\Program Files\\7-Zip\\7-zip.dll'
Furthermore, when updating from an older version to this version (23.1), the 7zip right-click menu had disappeared; a forced reinstallation from the console was required to make it reappear.

Eliott

Re: 7-Zip 23.1 uninstallation error

Published: August 7, 2023 - 3:23 PM
by jpele
Good morning,
I noticed this bug and identified it as being related to the explorer.exe executable. I don't have a real fix to offer.

Here is the new uninstall() code; you can try uncommenting killalltasks("explorer"), which is hardly recommended...

Code: Select all

def uninstall():
    # Deleting 7z from path
    remove_from_system_path(app_dir)

    # Removing any remaining files
    if isdir(app_dir):
        killalltasks(ensure_list(control.impacted_process))
        # killalltasks("explorer") # can help
        remove_tree(app_dir)
I would appreciate it if you could identify a setting that may have been applied to your 7zip installations that might be causing this problem.

Sincerely,
Jimmy