0

I'm currently encountering a problem with a .zip archive made using 7zip. Whenever I try to unzip it using the context menu (right click -> 7zip -> extract here) or using a bat script (or cmd) "C:\Program Files\7-Zip\7z.exe" e -y archive.zip -bb3 -slt I don't have any logs explaining(*) what is wrong with the process. My RAM is way far from being on full usage, it just uses 10gigs out of 32, I also have enough place on my machine storage.

BUT whenever I'm opening the 7zip GUI and navigate to my archive and then extract it from here, it works.

My archive is created through 7zip so I cannot use builtins Expand-Archive because it doesn't work through the context menu or the powershell as well. (It says the archive is empty)

My zip archive is not damaged because this exact same zip can be unzipped using cmd on another machine using the same version of 7zip.

Details :

7zip versions tested : 24.04 and 19.0 (first version used to write this script)

(*) Logs from CMD :

Cannot open the file as [zip] archive
The file is open as [7z] archive

--
Path = D:\...\myArchive.zip
Open WARNING: Cannot open the file as [zip] archive
Type = 7z
Physical Size = 713624835
Headers Size = 297
Method = LZMA2:20
Solid = +
Blocks = 3

- archive.sql
- another.sql
 58% 1

When used in a longer bat script, it doesn't make the script stop. It just act as if the unzip went well and that it could be treated.

1
  • 1
    Have you tried re-installing 7-Zip on the machine where it doesn't work properly? Are there any differences, such as Windows version, between the machines? Commented May 27 at 14:19

1 Answer 1

1

It could be there were two versions of 7-Zip installed. The GUI refers to the correct location, and the the Registry entry for the 7-Zip context menu item, in HKEY_CLASSES_ROOT\, is pointing to an old installation.

7-Zip context menu in Registry

Easiest fix might be to completely uninstall 7-Zip, then install the latest version of 7-Zip.

However, you could manually edit the entry for the extension(s) causing the issue using Regedit.

1
  • When I'm using the CLI, it tells the version I'm using, which is the same as the one that works using the GUI.
    – JohnKondo
    Commented May 28 at 9:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .