Working with Windows Installer Properties

InstallShield 2012 Spring Express Edition

Windows Installer properties enable you to use variables for common paths and user information throughout your installation. These properties can be used in dialog text, .ini file changes, custom actions, and registry entries. For a list of these properties, see Windows Installer Property Reference.

Whenever these properties are used, they should be surrounded by square brackets. For example, to display the installation directory on a dialog, you may enter the following in the Text and Messages view:

This program will be installed to [INSTALLDIR]

To the end user, this sentence appears as follows:

This program will be installed to C:\Program Files\Your Company\Your Product

Property Types

There are four general types of Windows Installer properties:

Public
Private
Restricted public
Required

Note: Some of these categories overlap. For example, the ProductCode property is a required private property.

Public Properties

Public properties have names that contain only uppercase letters. For example, INSTALLDIR is a public property. Public properties can be specified at the command line used to launch the installation or chosen by using an authored user interface.

Note: Only public properties have their values preserved from an installation's user interface to the point where the installation is changing the target system. If you set the value of a property in a dialog displayed to the end user, use a public property (for example, MY_PUBLIC_PROPERTY) if you want its value written to a file or to the registry.

Private Properties

Private properties have at least one lowercase letter in their name and cannot be changed from the user interface. For example, ProgramFilesFolder is a private property. End users have no control over the values of private properties, since they cannot be set from the command line.

Restricted Public Properties

Restricted public properties allow network administrators to define public properties that can be changed only by a system administrator. This way, the administrator can change settings quickly without having to worry that other users on the network may tamper with the setup. For more information, see Specifying that a Public Property Should Be a Restricted Public Property.

Required Properties

The Windows Installer service relies on five properties that are required in every Windows Installer installation. By default, these properties are included in every installation that you create using InstallShield.

ProductCode
ProductLanguage
Manufacturer
ProductVersion
ProductName

Conditions

Many properties are not set until the installation is launched. These properties are populated with information from the target system. For example, the VersionNT property is not set until the installation is launched. This property is set to the version of Windows that the target machine is running if the operating system is Windows 2000 or later.

Properties that are set at run time can be used to create launch conditions for the installation. If you want your product to be installed only on Windows XP, you can use conditional logic to check the end user's system, and install the product if all conditions are met.

See Also