7-zip Incorrect Command Line Opening RARs

Ok, this one┬áhas been┬ádriving me nuts for a couple of weeks now, ever since I rebuilt my system and installed Windows 7 64-bit. I have been using 7-zip for years, and kept on using it long after Windows gained excellent in-shell support for .ZIP folders, because 7-zip handles RAR, TAR and other formats, and unlike WinRAR it’s free and open source. However, after installing it on the 64-bit edition of Windows 7 I consistently got an “Incorrect Command Line” error trying to open RAR archives by double-clicking them in Explorer. If I right-clicked the archive and selected 7-zip -> Open Archive it worked fine. Not a big deal, but I’m the kind of guy to be bothered by this stuff until I get it fixed.

Today I noticed something interesting. If I right-clicked the file and chose Open With -> 7-zip GUI, I got the same error. However if I right-clicked and chose Open With -> 7-zip File Manager it worked fine, and got me to the archive folder view I wanted. For those of you not familiar with the different versions of 7-zip that come in the default install, there are three: 7-zip Console, 7-zip GUI, and 7-zip File Manager. Now I don’t understand exactly how 7-zip GUI differs from File Manager, but I’ll go out on a limb and assume it’s a GUI view of a single archive, rather than an Explorer-like Window in which you can navigate to different folders. Whatever. All that matters to me is that when I went into Control Panel -> Default Programs -> Associate a file type or protocol with a program, selected the .rar file extension, and clicked Change Program I was able to choose 7-zip File Manager as the default, and from that point onward it worked as it should. Tada!

32 thoughts on “7-zip Incorrect Command Line Opening RARs

  1. Thanks so much! You just helped me fix some pretty constant irritation with this fix. YOU ARE THE MAN. Or woman. Whichever you are, you’re THE it.

  2. Hey, thanks. I’ve been plagued with this for months.

    You don’t have to go into Control Panel, though…if you look at the 7zip folder in Start -> Programs, you can run the file manager there, and under options you can associate 7zip with all kinds of archives.

  3. Rock and roll. I swear when I installed 7-Zip I elected to associate it with tar files which is why I was so annoyed it didn’t work. After trying your suggestion, which worked, I rechecked the file associations and 7-zip reported that no files were associated. So I set them and restarted 7-zip…still no files associated.

    A quick check of the 7-zip site shows that one must run 7-zip as administrator (even though I’m an admin user on my machine, I still had to right click on 7-zip FM and select Run as administrator). Running as administrator I set the file associations, applied the changes and restarted 7-zip. File associations now set.

    Anyway, thanks for the info and helping smooth my taring.

  4. This is exactly the information that I was looking for. I can now open files with no trouble! Thanks so much! :)

  5. THANK YOU. Just spent forever downloading a .rar file on my terribly slow connection and got this error. Thought it was a corrupt file. YOU HAVE MADE MY DAY.

  6. Thanks a lot!

    This problem was resulting specially annoying because I could not to open an .tar file attached to a Word doc. I attempted to copy-and-paste into the desktop, but doing so seemed to corrupt the file.

    I applied the changes according to your note, and I can open the attached tar file without problems.

    Cheers …

  7. Let me add my undying gratitude and thanks. It is SO rare that a problem that looks so daunting gets fixed this easily – all due to your very clear and detailed directions.

  8. I have Windows 8 and I am receiving the “Incorrect command line.” I had previously set 7-zip GUI to be the program used, but obviously that is wrong and what is causing the problem, yet I can’t find the .rar file looking where you looked. I cannot right click the file and choose what you chose because it gives me different options, and I don’t know any other way to do it, like you. I don’t know if you can help me, but I would greatly appreciate it if you tried. Thank you.

  9. Hi, William. Thanks for stopping by. I don’t run Windows 8, so unfortunately I have no way of testing any proposed solution to this issue. Hope you work it out.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>