Open topic with navigation
Referencing an Environment Variable in a Registry Entry
InstallShield 2015 Express Edition
With REG_EXPAND_SZ string values, you can use environment variables for paths that are stored in the registry. These entries require special formatting in order to be recognized by the operating system as environment variables. The format for a REG_EXPAND_SZ value as it appears in the registry is %TEMP%. TEMP is the standard environment variable for the TEMP directory.
To reference an environment variable in a registry entry:
|
1.
|
In the View List under Configure the Target System, click Registry. |
|
2.
|
In the Feature list, select the feature that should contain the registry value that you want to add. |
|
3.
|
In the Destination computer’s Registry view pane, right-click the registry key that should contain the value that you want to add, point to New, and then click String Value. |
|
4.
|
In the Destination computer’s registry data pane, right-click the value and then click Modify. |
|
5.
|
To enter the value data, begin with a pound sign, and then type the environment variable. The environment variable name should be surrounded by percent signs. For example: #%TEMP%. |
The Type field for this entry appears as REG_EXPAND_SZ, and the Data field is %TEMP%.
Tip: If you are creating a 64-bit installation and you want to install registry entries to 64-bit registry locations (under HKEY_LOCAL_MACHINE\Software instead of HKEY_LOCAL_MACHINE\Software\Wow6432Node), add the entry to the SOFTWARE (64-Bit) node, or a subnode. Note that a 64-bit installation cannot be run on 32-bit target systems. To learn more, see Challenges of Supporting Both 32-Bit and 64-Bit Target Operating Systems.