AddEnvironmentVariable

From RAD Studio

Go Up to Local GetIt Packages Actions Data Index


Adds an IDE environment variable. Those variables can be used using macros, and they are persistent (IDE writes a registry key "Environment variables" and an MSBUILD file "environment.proj").

For instance:

$(Test)

Parameters

  • Parameter 1: String. Environment variable name to add.
  • Parameter 2: String. Environment variable value to add. Macros are allowed.
  • Parameter 3: Boolean. Optional. Specifies if GetIt must overwrite an existing variable or not.
    • False: will not update an existing environment variable.
    • True: will update an existing environment variable.
    • The default value is False.
  • Parameter 4: Boolean. Optional. Specifies if GetIt must expand or not macros of the value (parameter 2).
    • False: will not expand macros.
    • True: will expand macros.
    • The default value is True.

Examples

  • Example 1:
AddEnvironmentVariable("DemosDir", "$(BDSCOMMONDIR)\Samples\");
  • Example 2:
AddEnvironmentVariable("DemosDir", "$(BDSCOMMONDIR)\Samples\", "True");
  • Example 3:
AddEnvironmentVariable("DemosDir", "$(BDSCOMMONDIR)\Samples\", "True", "False");

See Also