[This is preliminary documentation and subject to change.]
The Environment table is used to set the values of environment variables.
The Environment table has the following columns.
Column | Type | Key | Nullable |
---|---|---|---|
Environment | Identifier | Y | N |
Name | Filename | N | |
Value | Formatted | Y | |
Component_ | Identifier | N |
Prefix | Meaning |
---|---|
= | The name/value is to be created when installed. |
+ | The name/value is to be created, if absent, when installed. |
- | The name/value is to be deleted, if present, when the component is uninstalled. |
=- | The value is set on install and removed on uninstall. This is the usual behavior. |
=+ | This is not a valid prefix |
* | The name refers to a system environment variable and by default the value will be written to the user's environment. This prefix is used with Windows NT. |
If the Value field in the table includes a [~], then the prefix characters apply to only the specified portion of the string. The use of [~] is described below in the Value column section.
The environment variable is removed if the Value field of the table is blank. Therefore, with a blank in the Value field, an [=] prefix deletes the environment variable on install and a [-] prefix deletes any current values on uninstall.
If [~] precedes the string, then the string will be attached at the end of the existing value.
If [~] follows the end of the string, then the string will be inserted at the beginning of the existing value.
If no [~] is present, then the string represents the entire value to be set or deleted.
If the Value field is blank, then the variable will be removed.
The character adjacent to the [~] in a preceding or appending value acts as a delimiter and separates one value from the next. For example, to add a value to the end of a semi-colon delimited list use "[~];new value".