Howto: extract files from a .msi file using the Windows command line

by admin on August 23, 2007

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 f:\zenworks\zfdagent.msi into c:\zfd701 you would type:

msiexec /a f:\zenworks\zfdagent.msi /qb TARGETDIR=c:\zfd701

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

[update 05-20-2009]

I have a new favorite MSI extraction tool called LessMSIerables.  Check it out!

{ 16 comments… read them below or add one }

Leave a Comment

{ 2 trackbacks }

Previous post:

Next post: