Howto: extract files from a .msi file

Every once in a while I need to extract the content of a .msi file in order to customize a deployment for a particular network environment. Sometimes initializing the .msi installer will temporarily extract the files into C:\Documents and Settings\<username>\Local Settings\Temp, but those files are removed once the installer exits.

To extract files from a .msi file at the command line, type:

msiexec /a PathToMSIFile /qb TARGETDIR=DirectoryToExtractTo

For example, to extract files from c:\installer.msi into c:\install you would type:

msiexec /a c:\installer.msi /qb TARGETDIR=c:\install

The destination directory does not need to exist prior to running this command.

If this doesnt work, a crude way is to rename the msi file to a rar file, winrar will then allow you to extract all the files – however… it doesnt name them properly, so I used a combination of LesMsierables a .net file which allows you to view msi files and compared the size to find the specific file I wanted..

You can follow any responses to this entry through the RSS 2.0 feed.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This blog is kept spam free by WP-SpamFree.