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:TEMPFoo"
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_USERSoftwareClassesMsi.PackageshellExtract MSIcommand] @="msiexec.exe /a "%1" /qb TARGETDIR="%1 Extracted""
Hope that helps!
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!
Nice.
Thanks so much, a brilliant tip and works in Windows 7.
Nice tip – thank you 🙂
Awesome – thanks! (also used it in Windows 7)
I am unable to find Msi.Package after classes in regedit, note that i am using windows xp sp3
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.
Where does it extract to?
A directory called ” Extracted” in the same directory. Make sure you have permissions here.
Any idea on how to extract the registry keys from an msi. Like you’d get a .reg file ?
Use the Orca MSI tool http://support.microsoft.com/kb/255905
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
Yes, I talk about the command-line (/a) switch in the post, the ideas was to make it more easily accessible from explorer.
Thanks you Duncan!
Sweet! Nicely done!
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 googe search for MSI 2350 http://www.google.co.uk/search?q=msi+2350 suggests that “the installed version of the Windows Installer is too old for the MSI being executed” so perhaps you need to update your version of Windows Installer http://www.microsoft.com/download/en/details.aspx?id=8483
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.
OK, no idea – might be a problem with the installer.
thank you, you rock!
very simples! thanks
By far, the best tip I’ve received this year!