guides:programming:programmers_reference_manual:setenvar_method_system

SETENVVAR method (System)

This method sets the value of a Windows environment variable.

SuccessFlag = Exec_Method( "SYSTEM", "SETENVVAR", EnvVarName, NewValue )

NameRequiredDescription
EnvVarValueYesName of the environment variable to update.
NewValueNoNew value for the variable. Defaults to null.

TRUE$ if the variable was set successfully, or FALSE$ otherwise.

This method is a simple wrapper around the Windows API SetEnvironmentVariable function - further information regarding Windows environment variables may be found on the MSDN website.

 
// Set the value of the Windows "MyVar" variable

  

  SuccessFlag = Exec_Method( "SYSTEM", "SETENVVAR", "MyVar", "SomeNewValue" )
 
 
 

GETENVVAR method, ENVVARLIST property

  • guides/programming/programmers_reference_manual/setenvar_method_system.txt
  • Last modified: 2023/10/25 10:50
  • by 127.0.0.1