|
|
|
|
|
SysChangeEnvironment (Function) In french: SysChangeEnvironnement Modifies the environment variables of the operating system found on the current computer. Note: SysEnvironment gets the environment variables of the current operating system. VAR is string = "VAR_USER" IF SysEnvironment(VAR) = "" THEN // The variable does not exist, create it SysChangeEnvironment(VAR, "VAL_VAR_USER", sysEnvUser) Info("The variable has been added," " the changes will be taken into account at the next startup") ELSE // the variable exists, delete it SysChangeEnvironment(VAR, Null, sysEnvUser) Info("The variable has been deleted," " the changes will be taken into account at the next startup") END
Syntax
<Result> = SysChangeEnvironment(<Name> , <Value> [, <Permanent>])
<Result>: Boolean - True if the modification was performed,
- False if an error occurs.
<Name>: Character string Name of the environment variable to modify. The environment variable is created if it does not exist. <Value>: Character string New value for the specified environment variable. <Permanent>: Optional Integer constant Corresponds to one of the following constants: | | sysEnvGlobal | Change global to the system: Applies to the current process as well as to the new processes in the system. The new value will be taken into account during the next connection of the user.
Note: To use this constant, the user must be an administrator. | sysEnvProcess (Default value) | Change of current process only. | sysEnvUser | Change applied only for the current user: This applies to the current process and to new processes started by the user.
The new value will only be taken into account the next time the user logs in. |
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|