写入或修改一个环境变量.
EnvSet ( "环境变量" [, "值"] )
环境变量 | 环境变量名. |
值 | [可选参数] 目标环境变量的值.使用时若没有指定此参数则该环境变量将被删除. |
成功: | 返回非0. |
失败: | 返回 0. |
Example()
Func Example()
; Create an environment variable called %MYVAR% and assign it a value. When you assign or retrieve an envorinment variable you do so minus the percentage signs (%).
EnvSet("MYVAR", "This is some text!")
; Retrieve the environment variable that was just assigned a value previously.
Local $sEnvVar = EnvGet("MYVAR")
; Display the value of the environment variable $MYVAR%.
MsgBox(4096, "", "The environment variable %MYVAR% has the value of: " & @CRLF & @CRLF & $sEnvVar)
EndFunc ;==>Example