Unzipping/extracting MSI files

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:

image

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!

Advertisement

19 Responses to Unzipping/extracting MSI files

  1. Veton says:

    Sorry for offtop, I just found your comment at
    http://blog.codeville.net/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/ and it helped me a lot. Great thanks for it!

  2. nodmonkey says:

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

  3. Neil says:

    Nice tip – thank you :-)

  4. art says:

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

  5. sami says:

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

    • Duncan Smart says:

      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.

  6. Brian says:

    Where does it extract to?

    • Duncan Smart says:

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

  7. nb says:

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

  8. Dennis_Wolf says:

    You could also use just the windows command line to extract msi data/content.
    More info here:

    http://cyberst0rm.blogspot.com/2011/07/how-to-extract-contentdata-from-msi.html

    • Duncan Smart says:

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

  9. Rudi says:

    Thanks you Duncan!

  10. Tc Holmes says:

    Sweet! Nicely done!

  11. A Imanse says:

    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?!

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.