[SOLVED] 7-Zip 23.1 uninstallation 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
eliottiph
Messages: 32
Registration: May 2, 2022 - 10:41

August 2, 2023 - 3:09 PM

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
Last edited by eliottiph on August 8, 2023 - 10:27, edited 1 time.
User avatar
jpele
Messages: 156
Registration: March 4, 2019 - 12:01
Location: Nantes

August 7, 2023 - 3:23 PM

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
Locked