Terms of Use For FixedByVonnie

By proceeding to access fixedByVonnie.com, you expressly acknowledge, and agree to, all of the following:

fixedByVonnie.com is a personal website and blog owned by Security Plus Pro LLC, which is being presented for informational purposes only. The views on this website are solely those of the website owner (and not those of any employer or of any professional associations affiliated with the website owner).  Any views expressed in this website and any information presented on this website, or in any of its blog entries, should not be relied on for any purpose whatsoever other than as the personal opinions of the website owner.  The website owner expressly disclaims any and all liability for any information presented on this site.  The owner of this website and its blog posts shall not be held liable, and shall be held harmless, for any errors or omissions in any information or representations contained in this website, or in any of its blog entries.  The website owner also expressly disclaims any liability for the current or future availability of any such information. The website owner makes no representations as to the accuracy or completeness of any information on this website or which may be found by following any link on this website. The website owner shall not be held liable for any losses, injuries, damages, claims, or causes of action, from the display or use of any information on this website or in any of its blog entries. If you use the information on this website, or on any of its blog entries, you do so solely at your own risk.

How to make WinRAR extract archives to a folder named after the archive on click - fixedByVonnie

How to make WinRAR extract archives to a folder named after the archive on click

I think Winrar is a great archive manager but sometimes it doesn’t do exactly what you want.

For example, how would you go about extracting an archive with Winrar?

Let’s say you just downloaded the super cool Python web framework called Django to your Downloads folder.  Your freshly snagged file is called Django-1.6.tar

Most people would just browse to the archive, right-click it and choose Extract To Django-1-6\ from the context menu.  This will dump the contents of the archive to a folder in the current directory; however, that’s too many steps… and man I’m lazy.

Is there a faster way to accomplish the same task?

Winrar Extract Archive To...

Wouldn’t it be nice if you could instantly extract the archive to a folder with the same name by simply double-clicking the archive?

Yes, I’m glad you asked.  Fortunately we can do some digital alchemy with the registry to conjure up a nice little hack.  It’s actually pretty easy to pull off, let me walk you through the process…

Backup the Registry

First we need to pop open the registry and export a copy as a backup.  That way if we fat-finger a mistake we can import the registry and get out of our conundrum.

Click Start and type:


and click File > Export.

Save it to a USB stick or external drive and call it registry-before-winrar-hack.

Registry ExportDepending on the size of your registry this could take anywhere from a few seconds to 5 minutes.  When it finishes you’ll see the file hanging out on your file system.  Mine was about 150MB and took 5  seconds to complete.


Keys and Values

Now go back to the registry.  Do you see all those folders in the left pane?  Those are called keys and share virtually the same function as traditional folders.  The nested keys are called sub-keys.

Also, like Windows folders Registry keys are hierarchical.  We need to expand the keys to access the default values for the WinRar command.  That way we can get in there and change what happens when you double click WinRar files.

Modify the command Key

Drill down to the following key:


You can confirm you’re in the right place by looking at the full path in the status bar that rides along the bottom edge of the Registry window.


Notice the (Default) name in the right pane.

Right click that, choose Modify and you’ll see an existing value in there.  It probably says something such as:

"C:\Program Files\WinRar\WinRar.exe" "%1"

You want to change it so there’s a padded x between the two ditto marks that separate the …exe” part from the “%1” part.

Change it so it looks like this:

"C:\Program Files\WinRAR\WinRAR.exe" x "%1"

Windows 7 Winrar Registry Edit String

Click OK, close the registry and you’re done. Double clicking the compressed file should auto-extract it to a new folder of the same name as the compressed file.

Most of that time that works; however, if it still not working for you then we can create a small batch file that will kick off on a double click event.  I know this sounds like a byzantine plan but it’s really pretty straightforward.

Fun with BAT files

Check it out:

Bust open Notepad and copy and paste the following line into the file.

"C:\Program Files\WinRAR\WinRAR.exe" x %1 "%~n1\"

Make sure you save it with a .BAT extension (not with the default .txt file extension).  I’ll save mine as Winrar-auto-extract.bat.

WinRAR batch file hack

Note the location where you saved the file because you’ll need that info for the registry hack.

Windows 7 File Location

Once you’ve saved the file, flip over to the Registry again and replace the Default value in HKEY_CLASSES_ROOT\WinRAR\shell\open\command with the path to your .BAT file.

Winrar Auto Extract BAT and Registry Editor

Click OK and that will do the trick.


Connect with Vonnie on Twitter

Posted in How To, Windows 7 Tagged with:
  • fuckboy

    doesnt seem to work for me. sometimes it just opens up the winrar menu . when it decides it wants to work it extracts files but not to a new folder, it just extracts as if you did an ‘extract here’ right click command