PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
SysChangeEnvironment (Function)
In French: SysChangeEnvironnement
Modifies the environment variables of the operating system found on the current computer.
Note: SysEnvironment is used to find out the environment variables of the operating system found on the current computer.
WEBDEV - Server code The modified environment variables correspond to the environment variables of the operating system found on the server.
Example
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 was added, the modification will be taken into account during the next startup")
ELSE
// the variable exists, delete it
SysChangeEnvironment(VAR, Null, sysEnvUser)
Info("The variable was deleted, the modification will be taken into account during the next startup")
END
Syntax
<Result> = SysChangeEnvironment(<Name> , <Value> [, <Permanent>])
<Result>: Boolean
  • True if the modification was performed,
  • False if an error occurred.
<Name>: Character string (with quotes)
Name of the environment variable to modify. The environment variable is created if it does not exist.
<Value>: Character string (with quotes)
New value for the specified environment variable.
<Permanent>: Optional Integer constant
Corresponds to one of the following constants:
sysEnvGlobalGlobal change for the system: the current process as well as all the new processes of the system are affected. The new value will be taken into account during the next connection of the user.

Note: To use this constant, the user must be administrator.
sysEnvProcess
(Default value)
Change of current process only.
sysEnvUserChange performed for the current user only: the current process as well as all the new processes started by the user are affected.

The new value will be taken into account during the next connection of the user.
Linux This parameter is ignored.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230std.dll
Linux wd230std.so
Minimum required version
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment