17

I cannot find the MSI format specification. It says that its an open standard, but I don't see any documentation - just bits and pieces of information here and there.

I want to modify some .msi installer, but I want to understand first what it is doing.

2
  • 1
    The MSI file format is undocumented, where did you read it's an open standard? Dec 29, 2009 at 2:34
  • 1
    An MSI file is a SQL database in a COM structured storage file, and the latter is essentially a file system in a file (file streams). Mar 11, 2014 at 2:49

9 Answers 9

15

The binary format is not open, I wouldn't even go as far as calling it a standard.

However I assume it's not the file format you're concerned with (which is undocumented), but rather the tables, actions, sequences, etc. that are visible when interfacing with the MSI via the Windows Installer SDK, API, Orca, etc.

Everything is covered in the SDK documentation, however for some reason search engines don't rank the documentation very highly. Also you can no longer download the Windows Installer SDK separately, it is now bundled as part of the Windows SDK.

14

MSI files are COM structured storage, which is described here: Structured Storage (Windows).

0
10

The MSI file format is not open and is in fact undocumented, however the API required to access these files is part of the Windows Installer SDK. That link describes both the API functions required to access and modify MSI databases (files), and the contents of the tables in an MSI database.

That said if you want to modify or view the contents of an MSI then the easiest way to do it is probably just to use an editor that someone else has made (which will in turn use these functions). The ones that I know of are:

  • ORCA
  • InstEd
  • InstallShield also have an MSI editor

If you really want to know more about the details of the internals of the MSI file format then take a read through of these two blog articles by Rob Mensching (the author of WiX)

1
  • The MSI file format is a COM-structured storage file containing a MS-SQL database and associated file streams. Jul 20, 2014 at 1:20
6

Sounds like you got a misunderstanding of Microsoft's promise.

Open Specification Promise

Published: September 12, 2006. Revised: February 15, 2007

Microsoft irrevocably promises not to assert any Microsoft Necessary Claims against you for making, using, selling, offering for sale, importing or distributing any implementation to the extent it conforms to a Covered Specification (“Covered Implementation”), subject to the following. This is a personal promise directly from Microsoft to you, and you acknowledge as a condition of benefiting from it that no Microsoft rights are received from suppliers, distributors, or otherwise in connection with this promise. If you file, maintain or voluntarily participate in a patent infringement lawsuit against a Microsoft implementation of such Covered Specification, then this personal promise does not apply with respect to any Covered Implementation of the same Covered Specification made or used by you. To clarify, “Microsoft Necessary Claims” are those claims of Microsoft-owned or Microsoft-controlled patents that are necessary to implement only the required portions of the Covered Specification that are described in detail and not merely referenced in such Specification. “Covered Specifications” are listed below.

This promise is not an assurance either (i) that any of Microsoft issued patent claims covers a Covered Implementation or are enforceable or (ii) that a Covered Implementation would not infringe patents or other intellectual property rights of any third party. No other rights except those expressly stated in this promise shall be deemed granted, waived or received by implication, exhaustion, estoppel, or otherwise.

The full list of the open specifications can be found at

http://www.microsoft.com/openspecifications/en/us/programs/osp/default.aspx

Since MSI is not listed within, you can safely assume that it is a private standard and won't be shared to general public.

3
  • 2
    Yet there are some 3rd party products which can create and modify .msi files
    – Demiurg
    Dec 23, 2009 at 15:19
  • Those 3rd party companies may have agreements with Microsoft where they pay for additional support and information. Dec 25, 2009 at 3:42
  • 4
    Virtually all these 3rd party products use the public Microsoft APIs to read/write MSI files. It's all included in the Windows SDK. May 12, 2010 at 22:49
4

Microsoft has published the MSI file format details. You can download the specifications for the various versions here: [MS-CFB]: Compound File Binary File Format

The latest version at the time of this writing is 9.0, released on 9/12/2018. You can download it as a PDF here.

3

Are you sure that .MSI database format is required to modify some installer? Have you heard about the Orca tool? If not, this MS KB article is for you:

http://support.microsoft.com/kb/255905

1
  • 1
    I'm using Orca to modify the file. It is great, but that's not the point - sometimes I can guess what is the meaning of each parameter, sometimes I cannot. What I'm looking for is the specification that defines how Windows Installer uses parameters from .MSI database to install the software
    – Demiurg
    Dec 23, 2009 at 15:18
2

In my work with MSI this link Windows Installer Tools & Tips was very helpfully.

0

Don't forget MakeMSI which is a free app to create MSI files.

1
  • a download link is provided on that page of the official site, scroll down to the DOWNLOAD MAKEMSI v16.059 header
    – Wolf
    Aug 4, 2016 at 10:59
0

This may help some people.

https://learn.microsoft.com/en-us/windows/win32/msi/windows-installer-portal

You can build your own installer builder application, if you go through this and learn the Windows Installer APIs explained here. With the APIs mentioned here you can build your own application that can edit the .msi file also.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.