39

I have installed 7-Zip on my machine and associated it with serveral archive file types.

When double clicking an archive (so far I have tried .zip, .7z and .bz2 files), a message box pops up telling me that 7-Zip cannot open this file as an archive. dialog screenshot

However, when I right click the file and select 7-Zip->Open as archive, it works just fine.

All the file type are associated to 7zFM.exe, the 7-Zip File Manager (as opposed to the 7-Zip GUI or command line).

Chris
  • 953
  • 2
  • 11
  • 25

4 Answers4

48

The problem is that the default is opening with 7zG (gui) while it should open with 7zFM (file manager).

You can change this using a program like DefaultProgramsEditor

Good luck.

Daniel
  • 481
  • 4
  • 2
  • 1
    This worked - now double-clicking an associated *.zip file opens up the 7z graphical interface as expected. – Arctic Vowel Jan 16 '16 at 08:09
  • Only this one worked for me. :) – Sourav Ghosh Aug 18 '16 at 20:44
  • +1 Still valid as of October 2020. – Sabuncu Oct 23 '20 at 16:55
  • 2
    And still valid October 2021. You can also change it using Windows context menu -> open with -> browse for other app -> find the 7zFM.exe in Program Files, select it, and then mark the 'Use this app to open always'. The literal text may be different. – RolfBly Oct 09 '21 at 19:50
7

You could try to reset the associations from within 7-zip File Manager. One thing to note, if you are using Windows 7, you need to run 7zFM as administrator so it can set the changes.

ChrisN
  • 1,049
  • 1
  • 9
  • 21
  • Thanks, this is a good idea I hadn't thought of yet. Unfortunately, this didn't fix it. – Chris Dec 17 '12 at 07:34
  • Worked for me with 7Zip 18.05 and Windows 10, with the menu Extras/Options on the first tab by setting the desired file types manally using the '+' button. – malamut Jan 02 '19 at 20:29
7

Some registry keys were pointing to an x86 version of 7-Zip, which for some reason can't handle being invoked directly on this machine. I am not sure whether this is a bug in the x64 version of 7-Zip or whether a x86 version was installed on this machine before and didn't uninstall cleanly.

The following registry keys referred to the Program Files (x86) directory. Changing those to refer to the Program Files directory fixed the problem.

HKEY_CURRENT_USER\Software\Classes\7z_auto_file\shell\open\command
HKEY_CURRENT_USER\Software\Classes\Applications\7z.exe\shell\open\command
HKEY_CURRENT_USER\Software\Classes\Applications\7zFM.exe\shell\open\command
Chris
  • 953
  • 2
  • 11
  • 25
2

As mentioned in a comment by @RolfBly, this can also be resolved as follows (Windows 10):

  1. Right-click on the file
  2. "Open With..." or "Open With..." > "Choose another app"
  3. Tick the "Always use this app to open .7z files" checkbox at the bottom of the popup
  4. Click "More Apps"
  5. Scroll to the bottom of the list, click "Look for another app on this PC"
  6. Navigate to the 7zFM.exe application - typically in Program Files/7-Zip
  7. Select the 7zFM.exe application, OK

.7z files will now open in 7Zip as expected

  • 1
    Since all the settings in my registry looked correct, the accepted answer was unhelpful. Your simple, direct answer, which didn't involve editing the Registry, worked. – David A. Gray Aug 20 '22 at 15:54
  • 1
    For what it's worth, my machine had some sort of indirect configuration, fully implemented under HKLM, and partially implemented under HKCU. – David A. Gray Aug 20 '22 at 15:55