Menu

#2501 7-zip.dll disappearing

open
nobody
None
5
2024-08-18
2024-08-08
jester38
No

Hello Igor,
I have found a scenario where the 7-zip.dll file can "disappear" accidentally after uninstalling and installing 7-zip. Here are the steps :
- Uninstall 7-zip.
- If the 7-zip.dll file is in use, it will be marked for deletion on the next system boot. But the uninstaller does not warn the user about this situation, so the user does not reboot the computer.
- The user reinstalls 7-zip or installs a new version of 7-zip.
- The installer sees 7-zip.dll is locked and stores the new 7-zip.dll file with the name 7-zip.dll.tmp in the program folder.
- Again, the installer does not warn the user about this situation, so the user does not reboot the computer.
- The user runs a cleaning tool to delete temporary files. The 7-zip.dll.tmp file is gone !
- The user shutdowns the computer.
- The user starts the computer. The old 7-zip.dll file marked for deletion is deleted and there is no 7-zip.dll.tmp too.
- The user ends up with no 7-zip.dll file and, thus, a missing 7-zip shell extension.
I kindly suggest you modify the 7-zip installer/uninstaller to warn the user when a reboot is recommended.
Also, instead of using the temporary 7-zip.dll.tmp name, you could use something like 7-zip-temp.dll to avoid unwanted deletion by cleaning tools.
Regards,
Alain

Discussion

  • Igor Pavlov

    Igor Pavlov - 2024-08-09

    In general users don't need 7-zip uninstalling.
    Also cleaning tool must not delete files from Program Files\7-Zip folder.

     
  • Richard Beckmann

    Well, this issue happens with updating or reinstalling as well, not just with uninstalling.

    From what I get is when either uninstalling 7-zip or updating it with 7z2408-x64.exe, the 7-zip.dll.tmp file is being created and the original 7-zip.dll file is being marked for deletion. After a reboot, the original 7-zip.dll is being deleted and 7-zip.dll.tmp renamed to 7-zip.dll. If a cleanup tool deletes 7-zip.dll.tmp before reboot then after a reboot the original 7-zip.dll gets deleted and that's it, hence 7-zip.dll disappears.

    7-zip.dll is a library used by explorer.exe for shell extension. 7z2408-x64.exe or the uninstaller currently doesn't detach 7-zip.dll from explorer.exe. Instead it marks it for deletion after reboot and creates 7-zip.dll.tmp for its replacement which to me it looks rather an unclean approach.. Is there a reason why the installer/uninstaller doesn't detach 7-zip.dll.from explorer.exe?

    PS. I encountered a similar issue in which I tried to manually copy Program Files\7-zip to an external drive, i.e. use it as a portable program. Especially, the 7-Zip File Manager is a very handy alternative to the Withdows Explorer. After each update I had to reboot before I could copy the files, so that the copied files don't contain 7-zip.dll.tmp.

     
  • Igor Pavlov

    Igor Pavlov - 2024-08-18

    I don't know safe way to detach dll from explorer.
    Explorer can have some reference to running dll, so it locks it for some cases.

    Cleaning tool must not delete files from Program Files\7-Zip folder.
    Only 7-Zip program knows what files in Program Files\7-Zip can be deleted.

     

Log in to post a comment.