GLBasic User Manual

Main sections

PUTENV

PUTENV name$, value$



With this command you can set the environment variable of the current process and all processes you create with SHELLCMD afterwards.

// Console Program
STDOUT GETENV$("") // list all variables

path$ = GETENV$("PATH")
PUTENV "PATH", path$+";C:/Test/myprogram"

STDOUT "\n\nPATH: " + GETENV$("PATH") // list path again

KEYWAIT

See also...