MSI File format [???]

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am writing some kind of a file scanner, at certain time all of the files
under a certain directory will be scanned, this scan require de-compression
of common files formats such as ZIP and MSI, the ZIP file format is well
known so there is no problem of decompressing it manually, however, the MSI
format is less open… I wonder where can I find the MSI format ‘white papers’?
Are those ‘white papers’ are published? How can I programmatically brows .MSI
files ( without executing them )?
 
Nadav,

The MSI file format is not a compression format. Rather, there is a lot
of information in there about registry settings, shortcuts, etc, etc. Last
I checked, there were something like 70 different "tables" of sorts (along
with compression for data in those tables).

I think for now, the MSI format is only shared with certain vendors, and
to my knowledge, there is no published document on the MSI file format. To
that end, you might have to go with a third party that is a trusted vendor
(I believe one of the installation packages handles MSI file formats) and
interface with that.

Hope this helps.
 
It's unfortunately a non-trivial task.

There is a set of API functions to programatically work with MSI
files. Inside of the MSI file there is actually a set of database
tables with relationships. You can read more in the Platform SDK:
http://msdn.microsoft.com/library/d...-us/msi/setup/windows_installer_reference.asp

Something else you might look at is Wix, which is a project Microsoft
has open sourced. You can "decompile" an MSI file into XML (and vice
versa):
http://sourceforge.net/projects/wix
 
There is a utility provided with the SDK called ORCA that will allow you to
see the information in table format It might aid you in your efforts.
 
Hi Scott,

- Thanks for your immediate response, I need to figure out a way to extract
a single file from the MSI package with out doing any special installation
procedure.
- I was looking at the Msi API you were referring to , BUT, I didn't find an
API to extract a single file from the installation package, I can use the
'MsiInstallMissingFile' API, BUT, I assume that this will copy the file and
will perform additional installation procedure ( such as registering the file
), however, I need to extract the file with out installing it...

Any help would be appreciated...
[*] How could I extract a single file from the MSI package with out
installing it ( e.g. registering it ) ?

Thanks in advance,
Nadav.
http://www.ddevel.com
 
Nadav said:
Any help would be appreciated...
[*] How could I extract a single file from the MSI package with out
installing it ( e.g. registering it ) ?

this might not help You, but Total Commander has a special add-on
"msi-plus.wcx" which allows user to browse through .msi files like through
..zip or .jar
it shows three sub-directories Dialogs, Streams and Tables and in Streams
folder there is .cab cabinet file that can be unpacked, and then You have
acces to installation files without installing anything

author of this add-on is Petr Bubela

RGDS PSG
 
HI Nadav:

You'll want to take a look at MsiRecordReadStream. It's been a while
since I have worked with the MSI API so I can't think of where the
specific examples are. You might want to poke around in the
microsoft.public.platformsdk.msi for API help.

--
Scott
http://www.OdeToCode.com/blogs/scott/

Hi Scott,

- Thanks for your immediate response, I need to figure out a way to extract
a single file from the MSI package with out doing any special installation
procedure.
- I was looking at the Msi API you were referring to , BUT, I didn't find an
API to extract a single file from the installation package, I can use the
'MsiInstallMissingFile' API, BUT, I assume that this will copy the file and
will perform additional installation procedure ( such as registering the file
), however, I need to extract the file with out installing it...

Any help would be appreciated...
[*] How could I extract a single file from the MSI package with out
installing it ( e.g. registering it ) ?

Thanks in advance,
Nadav.
http://www.ddevel.com


Scott Allen said:
It's unfortunately a non-trivial task.

There is a set of API functions to programatically work with MSI
files. Inside of the MSI file there is actually a set of database
tables with relationships. You can read more in the Platform SDK:
http://msdn.microsoft.com/library/d...-us/msi/setup/windows_installer_reference.asp

Something else you might look at is Wix, which is a project Microsoft
has open sourced. You can "decompile" an MSI file into XML (and vice
versa):
http://sourceforge.net/projects/wix
 
Back
Top