Skip to main content

Set-Environment-Variable

Command Description

Set environment variable

Command Prototype

Sys.SetEnviron(sEnvironName,sValue)

Parameter Description

ParameterRequiredTypeDefaultDescription
sEnvironNameTruestring""The name of the environment variable to be modified
sValueTruestring""The value of the environment variable

Demo

/************************************Set environment variables************ ********************* 
Command prototype:
sRet = Sys.GetEnviron ("")
Input parameters:
sEnvironName--the name of the environment variable to be modified
sValue-- the value of the environment variable
Outgoing parameters:
None
********************************************************************************/
Dim sEnvironName="java_home"
Dim sValue='''D:\app\Java\jdk1.7'''
Sys.SetEnviron(sEnvironName,sValue)