Summary
Creating, modifying, and removing environment variables from the Environment Variables view in InstallShieldSynopsis
This article discusses how to create, modify, and remove environment variables from the Environment Variables view in InstallShield. It also talks about the Environment table in the Direct Editor view. To create, modify, or remove environment variables, you will need to author the Environment Variables section under System Configuration view in your project.
Discussion
Follow these steps to create an environment variable:
- Open the Environment Variables view.
- Right-click the Environment Variables node and select Add Environment Variable.
- In the Component property, select a component you want to associate with this environment variable. Each change is associated with a component and takes place only if that component is set to install to the target machine.
- In the Value property, enter the value or path in the value setting. Predefined path identifiers can be used in this field. If you are specifying more than one path, separate them with a semicolon.
- In the On Install property, choose one of the following actions:
- Set: If Set is selected, the value is set as dictated by Placement property. If the environment variable does not exist on the machine, it will be created during the installation.
- Create: Create sets the value if it does not already exist based on the Placement setting. If the variable does not exist on the machine, the Placement setting is ignored.
- Remove: Remove deletes the environment variable from the system.
- In the Placement property, specify the placement of the value or path when modifying existing variables using one of the following values:
- Append: This option appends the path specified in the Value property of the environment variable to an existing path.
- Prefix: This option prefixes or appends the path specified in the Value property of the environment variable to an existing path at the beginning of the path.
- Replace: This option replaces the existing path with the path specified in the Value property of the environment variable.
- In the On Uninstall property, you have the option to Remove or Leave the environment variable on the machine.
- In the Type property, specify the type of variable either System or User. If you use a User variable, the environment variable is only available to the user logged on the machine. However, if you run the setup with ALLUSERS option, the variable is created for all the users on the machine.
If you need to make any further modifications that you can?t achieve with the options in the Environment Variables view, you can modify the entry in the Environment table. The table consists of four columns, Environment, Name, Value and Component_.
| Prefix | Description |
| = | Set the environment variable during installation. |
| + | Create the environment variable if it does not exist, and set during installation. |
| - | Remove the environment variable when the component is removed. This symbol can be combined with any prefix. |
| ! | Remove the environment variable during an installation. |
| * | This prefix is used with Microsoft® Windows® NT/Windows® 2000 to indicate that the name refers to a system environment variable. If no asterisk is present, the installer writes the variable to the user's environment. Microsoft Windows 95/98 ignores the asterisk and adds the environment variable to autoexec.bat. This symbol can be combined with any prefix. |
| =- | The environment variable is set on install and removed on uninstall. This is the usual behavior. |
| !- | Removes an environment variable during install or uninstall. |
|
=+
!+
!=
| These are not valid prefixes. |
As an example, if you want to:
- Set a system environment variable called PATH, if it exists
- Create it if it does not exist
- Leave it there upon uninstallation
Select a component to associate it with this table entry. If the component is installed, this environment modification will take place.
Related Articles
Exporting environment variables like TNS_ADMIN to the Snow Inventory Oracle Scanner 107Number of Views New Environment Variables Not Available Until After Installation Completes 8Number of Views Environment Variable 15Number of Views How to set Environment Variable FLEXLM_TIMEOUT Through Registry 6Number of Views Setting an Environment Variable on Unix / Linux using InstallAnywhere 4Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago