Add an Environment Variable

<< Click to Display Table of Contents >>

RayPack > 7.3 u6 > User Guide > PackDesigner > MSI / MST / RPP Based Projects > Visual Designer Mode > System Configuration > Environment Variables 

Add an Environment Variable

In order to add an environment variable data object to a packaging project, go to the Environment variables view of the Visual Designer mode.

Click the Create new... button, which is available in the upper left corner of the views content area.

The new environment variable wizard is displayed.

 

At any time, using the Next or Back buttons, which are displayed at the bottom of the wizard dialog, enables navigation within the already processed steps.

To exit the wizard without creating a new object, use the Cancel button, also located at the bottom of the wizard dialog.

Step 1: Actions

The behavior of an environment variable data object can be manipulated from three separated angles:

When the Package is Installed

Create the variable if it does not exist
If the environment variable already exists on the target machine, no action is applied during installation.
If it does not exist, a new environment variable is created on the target machine.

 

Create or set the value of the variable
If the environment variable already exists on the target machine, the action defined above (append, prepend, replace) is executed.
If it does not exist, a new environment variable is created on the target machine.

 

Remove the variable from the target system
If the environment variable exists on the target machine, it is removed during installation.
If it does not exist, no action is applied during installation.

When the Package is Uninstalled

Leave the variable
No action is applied during uninstallation.

 

Remove the variable
If the environment variable exists on the target machine, it is removed during uninstallation.

Step 2: Details

Environment Variable

The localizable name of the environment variable as it is visible for the end user on the target machine. Any non-empty alphanumerical string is a valid name value.

 

Internally, RayPack uses the Name column to store information about the behavior and target scope of an environment variable. A visual interface for the manipulation of these settings is provided once an environment variable data object is created. Therefore, it is recommended to simply set the visible display name of the environment variable as desired during this initial create procedure, and go for advanced options later when the data object is ready for edition.

Value

The value of the environment variable as it will be set on the end users target machine.

 

Internally, the value is saved in a formatted table column. The Formatted data type is a text string that is processed to resolve embedded property names, table keys, environment variable references, and other special sub-strings. Please refer to the official MSI documentation for details regarding the Formatted data type.

 

RayPack uses the Value column to store information about the behavior and target scope of an environment variable. A visual interface for the manipulation of these settings is provided once an environment variable data object is created. Therefore, it is recommended to simply set the visible value of the environment variable as desired during this initial create procedure, and go for advanced options later when the data object is ready for edition.

Placement

Append
The value entered above is added as a suffix to the value of the environment variable as it exists on the target machine during run time.
RayPack automatically prepends the following symbols to the Value column of the Environment table to trigger this behavior: [~];

 

Prepend
The value entered above is added as a prefix to the value of the environment variable as it exists on the target machine during run time.
RayPack automatically appends the following symbols to the Value column of the Environment table to trigger this behavior: ;[~]

 

Replace
The value entered above fully replaces the value of the environment variable as it exists on the target machine during run time.
Please note that the Placement property is only available for manipulation if the behavior of the environment variable during installation is set to "Create or set" (see section on Actions above)

Step 3: Context

Per-system

System variables are related to resources and settings of any logged user on the target system.

Location in the target device registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

Per-user

User variables are related to resources and settings owned by various user profiles within the system. These variables usually do not refer to critical system resources or locations, which are necessary for the operating system to run.

Location in the target device registry: HKEY_CURRENT_USER\Environment

Step 4: Summary

Use the summary page to check the correctness of the environment variable properties that were defined during the previous wizard steps.
 

If all properties are set as required, click Process to finally create the new item

If changes are necessary, click Back until the wizard step with the incorrect property definition(s) is displayed and make modifications as required.
Please note that changes in an early step may lead to different defaults or options in any later step. Therefore, please verify that all steps contain the desired settings whilst Next-ing to the summary page again.

Step 5: Finished

Once the new environment variable object has been created, the wizard can be closed by using the Finish button at its lower right corner. The Environment variables view is updated, and the list of existing variables contains the newly created object.