Windows Installer, Java Installer, Freeware Installer
Home|Contact|Site Map|TOC|Search
Download  Features   Java  Licensing  Purchase  Testimonials  Support  Forums

How do I make the properties in the package keep their values during Maintenance?

Answer

Most of the installation packages use custom properties for retrieving information from the user. Since the values of these properties are specific to the install process which sets them, the values set in one process cannot be used in another process (for example the properties set in the first installation don't have the same value during a repair). This can be solved by writing the values of the properties into the registry.

Let's suppose that the installation package requires an Username and a Password every time it is launched in order to determine what it must do. For this purpose you can use two Edit Box controls which have the properties USER and PASSWORD

Write the values of the properties into the registry

This can be done by following these steps:

  • after the edit boxes are created and configured you can go to the Registry page
  • create a new registry value in HKEY_LOCAL_MACHINE\Software\[Manufacturer]\[ProductName]
  • set the "Name" field to Username and the "Data" field to [USER]
  • create another registry value in the same key
  • set the "Name" field to Password and the "Data" field to [PASSWORD]

This way you will create two registry values (Username and Password) which will contain the values of the properties "USER" and "PASSWORD" (which are set by the end-user).

Read the values of the properties from the registry

When running the installation in Maintenance mode (the "Modify", "Repair" and "Remove" options) the package must have access to the username and password. In order to improve the functionality, this information should be stored in the USER and PASSWORD properties..

For this you can follow these steps:

  • go to the Search page and create a new search
  • use the "Add Location" context menu to add the Registry as the search location
  • in the Registry Location Properties section set the registry value in which the installation wrote the username information (for example, retrieve the raw value from HKEY_LOCAL_MACHINE\SOFTWARE\Your Company\Your Application\Username)
  • rename the search to USER (the name of the search is actually the name of the property which stores the result of the search)
  • do the same for the password (you will search for the "Password" registry value in the same key and the search will be named PASSWORD)

This way the Username and Password set during the first installation can be used during Maintenance.

Privacy Policy | Windows Installer | Search Engine Ranking | Link Analyzer