Friday, May 05, 2006

public vs private properties in MSI

Intro

Sooner or later every developer after development stage faces deployment stage. This stage turns out in developing another application, namely installer.

There are a lot of installers out there. Here I will enumerate some NSIS - Nullsoft scriptable install system, InstallShield, WISE, WiX and a lot of others. The latter use Microsoft Installer technology. All of them, except Nullsoft installer, produce .msi and other MS Installer files.

Properties in MSI

Since MSI file is a collection of tables, properties are placed in special table called, I think you will guess - "Property" :8-).So, what’s so special about these properties?

Custom Actions and Properties

Every installer developer should be aware that there are 2 types of properties in MSI. Values from Properties table are used by an installer as global variable during install process.

Information about types of properties is of special value for "custom actions" (CA) developers. CAs are special programs (.exe) or modules (.dll) that are called during installation process to perform special actions.

Now, let’s get back to properties...

Docs say:
- Private properties: The installer uses private properties internally and
their values must be authored into the installation database or set to values determined by the operating environment.
- Public properties: Public properties can be authored into the database and changed by a user or system administrator on the command line, by applying a transform, or by interacting with an authored user interface.

You will ask, how Installer determines which are private and which are public?
It is very simple public properties must be uppercase, and that’s it.

So, if your custom action stopped working and the problem is that it cannot read property from msi, then the first thing you should check is if this property is public.

No comments:

Post a Comment