Welcome to MSDN Blogs Sign in | Join | Help

Extracting Files from a .MSI package

The Scenario

One needs to retrieve a couple of files from a windows installer package (.MSI file).

One could install the MSI and find the files in the *Program Files* folder but there are problesm:

  • can take too long to perform the installation
  • it's desirable to avoid *polluting* the machine with unneeded software (files, registrykeys, etc.)

 

A built-in solution is available in Windows

Via the command line

C:\> msiexec /a <filename of the msi>

For Example:

C:\> msiexec /a foobar.msi

 

What does the /a do?

the /a option creates an *administrative install*.

In short: instead installing the application the setup UI will ask you where to dump all the files in the MSI package.

 

What is an administrative install?

The scenario for the /a was intended to run the application from from a network location. For example, all the desktops in some corporation would just get a couple of the application's files and start menu shortcuts, etc. but most files would be on some remote location (network file share). This kept the disk footprint of the application small for each desktop.

The /a option is the tool the admin uses to create that share.

 

Published Monday, November 28, 2005 9:07 PM by saveenr

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Extracting Files from a .MSI package

gr8 one. Nice Tip.

Thanks a Lot.
Tuesday, November 29, 2005 6:14 AM by Raghuraman

# re: Extracting Files from a .MSI package

Just what I was looking for. Nice one, mate.
Saturday, December 10, 2005 3:14 PM by D McKay

# re: Extracting Files from a .MSI package

Good tip - I just ran the command but I can't seem to find where it extracted the files to. If you have any idea please let me know :-)
Wednesday, December 28, 2005 8:00 PM by Marvin

# re: Extracting Files from a .MSI package

Great tip!   Now... Hod do we put together again the msi file wit a replaced element that was bad in the original msi package?

Hope to hear something

Mike

Monday, December 25, 2006 12:31 PM by Mike Aparicio

# re: Extracting Files from a .MSI package

Excellent tip. Note that if the msi file was configured to extract without prompting then those files will be extracted "somewhere" without any prompt. For that situation I recommend using FileMon (SysInternals/Microsoft tool: http://www.microsoft.com/technet/sysinternals/utilities/filemon.mspx) to monitor the extraction operation.

Tuesday, August 28, 2007 6:43 AM by Rehan

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker