If, like me, you are constantly wanting to just extract the files from a Windows Installer MSI file quickly, then this is for you.

My ZIP utility of choice 7-Zip appears to support extracting MSI files but in fact extracts all the various weird and wonderful binary streams in the MSI rather than simply just the actual files. Thankfully I stumbled across a Windows Installer switch today after typing msiexec /? that does the job perfectly: the /a “administrative install” switch, e.g.:

msiexec /a foo.msi /qb TARGETDIR="C:\TEMP\Foo"

So, what I’ve done is packaged this up as a little registry tweak that conveniently lets you do this by simply right clicking a file like so:


Copy and paste the following into a *.reg file and double-click it:

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\Msi.Package\shell\Extract MSI\command]
@="msiexec.exe /a \"%1\" /qb TARGETDIR=\"%1 Extracted\""

Hope that helps!


Comment by Veton

Sorry for offtop, I just found your comment at
blog.codeville.net/.../ and it helped me a lot. Great thanks for it!

Comment by Shady


Comment by nodmonkey

Thanks so much, a brilliant tip and works in Windows 7.

Comment by Neil

Nice tip - thank you :-)

Comment by art

Awesome - thanks! (also used it in Windows 7)

Comment by Rudi

Thanks you Duncan!

Comment by Duncan Smart

Yes, I talk about the command-line (/a) switch in the post, the ideas was to make it more easily accessible from explorer.

Comment by nb

Any idea on how to extract the registry keys from an msi. Like you'd get a .reg file ?

Comment by Duncan Smart

A directory called " Extracted" in the same directory. Make sure you have permissions here.

Comment by sami

I am unable to find Msi.Package after classes in regedit, note that i am using windows xp sp3

Comment by Duncan Smart

Yes, it's normally in HKEY_LOCAL_MACHINE - but I put it in HKEY_CURRENT_USER so it only affects the current user, and not everyone who logs into the machine.

Comment by Tc Holmes

Sweet! Nicely done!

Comment by A Imanse

Ah, but i have the latest Win 7 sp1... so i'm confused.... Further yet, it begins the installation, but at the end of it, it gives the error.

A Imanse
Comment by A Imanse

I'm fairly new to the whole registry science, but i've applied this reg to my regedit. I've tried to extract, using the new option in the drop-down, the msi file yet it gives me a 2350 error at the end of the extraction.... Can you help me?!

A Imanse
Comment by Duncan Smart

OK, no idea - might be a problem with the installer.

Comment by Brian

Where does it extract to?

Comment by ryan

thank you, you rock!

Comment by lvfiorot@gmail.com

very simples! thanks

Comment by Thanks

By far, the best tip I've received this year!