Using Variable Data Types in Registry Data

InstallShield 2024

Project: This information applies to the following project types:

Basic MSI
InstallScript MSI
MSI Database
Transform

InstallShield allows you to use variable data types or properties when creating registry data for your installation project.

To use INSTALLDIR as a variable in the registry (Windows Installer-based projects only):

1. In the Project Assistant, open the Application Registry page.
2. Select Yes to indicate that you want to configure the registry data that your application will install.
3. Right-click HKEY_CLASSES_ROOT, point to New, and select Key.
4. Name the key Installation Location.
5. Right-click the Installation Location key, point to New, and select String Value.
6. Name the string value My Installation Location.
7. Double-click the My Installation Location key. The Edit Data dialog box opens.
8. In the Value Data field, type [INSTALLDIR].

At run time, the value of [INSTALLDIR] is replaced with the installation directory.