Properties are variables used by Windows Installer during installation. The list of Properties is found under the Product tab in the Setup Editor of Wise for Windows Installer.

Five Ways to Set a Property

1. The author of the MSI can add his or her own properties in Properties, found under the Product tab in the Setup Editor of Wise e.g. INSTALLDIR

2. Properties can be set at the command line. To set a property at the command line uses the shown command line. This is only possible for public properties, these are always in capital letters:
Msiexec /I =”Your Value” e.g. ALLUSERS =1

3. Wise automatically sets certain properties. An example of an automatically installed property would be installation dialog boxes; Wise defaults to a certain series of dialog boxes for the installation of every MSI

4. Some properties are set by Windows Installer according to the configuration of the Destination computer.

5. Properties can be set up so that the values are derived from the input of users. A dialog box is offered to the user and the results become the value of the property

Categories of Properties

There are three categories of properties as defined by Windows Installer documentation:
• Private properties
• Public properties
• Restricted public properties.

Restricted public properties are only relevant on locked-down Windows NT, Windows 2000, or Windows XP computers

Private properties cannot be changed from the command line, neither can they be passed from the UI Sequence (the period of the install when dialog boxes are displayed, user choices are made, system information gathered) to the Execute Sequence (the period when the program is actually installed). This means that private properties are more secure. Properties are made private by using some lowercase letters in the name of the property.

Public Properties can be changed from the command line and passed from the UI Sequence to the Execute Sequence. For a property to be public, it must contain no lowercase letters.

Restricted Properties. The author of the MSI may want to limit the ability to change some public properties i.e. not want the user to change them. When the ‘Add to the list of restricted public properties’, box is checked within a Property it can only be changed by the System Administrator (Note that this is only relevant on Windows NT/2000 systems).

Most Important WFWI Properties

The following list is a collection of common Wise for Windows Installer Properties. The properties are listed below with a brief description of what each property does:

1. INSTALLDIR – This is the property/directory that holds the location where the main application will be installed. Generally, this is the location of the first directory created in your install when using the Installation Expert

2. TARGETDIR – This property specifies the root destination directory for the installation.

3. ALLUSERS – This property is set to a value of 0, 1, or 2. The property determines if shortcuts are installed to the current user’s profile or to the All User’s Profile on Windows NT and Windows 2000 platforms

4. REBOOT – This property is set to a value of Force, Suppress, or ReallySuppress. This property allows the user to force a reboot at the end of the install or suppress a required reboot to varying extents

5. APPS_TEST – This property, when set to 1, allows the user to make use of the DRLocator table and RegLocator table with the AppSearch table to search for and retrieve files paths or registry key values

6. SystemLanguageID – This property holds the value of the current language code the operating system is running

7. VersionNT – This property contains the current version number of an NT based operating system

8. Intel/Alpha – These properties identify the type of processor used in the current machine. A numeric value is used to represent each different processor type (such as 4 for 486, 5 for Pentium, 6 for Pentium Pro/II/III)

9. Time – This property holds the current local system time

10. Date – This property holds the current local system date

11. AdminUser – This property is set if the current user has administrator privileges on the local machine

12. INSTALLLEVEL – This property contains the current installation level (stored as a numeric value). The Windows Installer will install all features whose level attribute is less than or equal to the value in INSTALLLEVEL

13. ProductCode – This Property is a unique identifier for the particular product release, represented as a string GUID.

14. ProductLanguage – This Property specifies the language the installer should use for any strings in the user interface.

15. Manufacturer — is the name of the manufacturer of the product.

16. ProductVersion – is the version of the product in a specified string format.

17. ProductName – contains the name of the application being installed, for example, Microsoft® Office 97. This is only used for display purposes.

Creating Properties

Properties are found under the Product tab in the Setup Editor.

1. To create a new property, right click on Properties and select New > Property from the menu

2. In the dialog box that opens, enter the Name of the property (Properties can contain only letters, numbers, underscores (_) or periods and must begin with a letter or number) and assign the property a value (you must enter an initial value for the property as the table cannot hold an empty/blank value)
If you wish the property to be a restricted public property, check the relevant box – note that the box will not be available should there be any lowercase text in the Name box.

Editing Properties
To edit a property, right click on that property and select Details.
Deleting Properties
Delete a property by right clicking on that property and selecting delete from the menu.

LAB – Reading a Registry Value to a Property
In this exercise we will create a registry entry containing your name. Once completed, we will check the result by running regedit to check this entry has been created correctly.
1. Select Installation Expert ► Target System – System Search page, click on the Add button and select Registry.
2. In the Read Registry Value dialog box, enter the name of the Property you wish to set (select from the drop down list or create a new property name).

3. Select the Operation type using the drop down list. In this case we are looking for the registry value so choose “Read raw value from registry”.
4. Select appropriate Root using the drop down list.
5. Fill in Key field using the name of the key. This is the key path minus the Root. Do not use a leading or trailing ‘\’ symbol in this field; the Windows Installer will make the necessary substitution at runtime.
6. Fill in the Value Name. This is the text that is in the Name column of the right hand section of the Regedit tool.
7. To check process worked – display result in dialog box by using property name. It should display the registry value.

LAB – Using a Property to Remove a File at Install Time
During an installation, you might want to remove existing files from the destination machine. One reason to do this is to save disk space. Another reason is to avoid possible file conflicts between a previous installation and a new installation. This clean up helps prevent errors during installation.

To set up your installation to remove an existing file (such as c:\Program Files\myfile.txt) from he destination machine, follow these steps:

Create or open an installation in Wise for Windows Installer (e.g. WinZip.wsi)

1. Go to the Components tab in Setup Editor.
2. Add an empty component by right-clicking the Components icon and selecting New > Component.
3. In the Component Details dialog box, enter a name, such as ABC, in the Component field.
4. Leave the remaining fields set to their default values, or set them specific to your installation. Click OK.
5. Go to the Feature tab in Setup Editor. Choose a feature to associate with this component. To ensure that this component is installed, choose a feature that is always installed.
6. In the left pane, right-click the feature you chose and select New > Component Assignment.
7. In the Assign Components to Feature dialog box, click the name of the empty component you added in the first step. For example, click ABC. Click OK.
8. Go to the Product tab in Setup Editor.
9. Right click the Properties icon and select New > Property.
10. In the Property Settings dialog box, enter a property name, such as XYZ, in the Name field.
11. In the Value field, enter the directory path on the destination machine that contains the file you want to delete. For example c:\Program Files.
12. Click OK.
13. Go to the Tables tab in Setup Editor. In the left pane, right-click RemoveFile and select New > Row to create a new row.
14. In the new row that appears in the right pane, enter the following fields:
FileKey: Enter any value, for example, TEST.
Component: From the drop-down list, select the name of the empty component that you created, such as ABC.
FileName: Enter the name of file you want to delete, for example, myfile.txt.

DirProperty: Enter the name of the property that contains the file pathname as a value, for example XYZ.

InstallMode: Enter one of the following (we recommend entering 3):
1=Remove only when the associated component is being installed.
2=Remove only when the associated component is being removed.
3=Remove in either of the above cases
15. Compile and run your installation.
When the user runs this installation, the file c:\Program Files\myfile.txt will be removed.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: