Click to See Complete Forum and Search --> : Setting Env Variables


April 18th, 1999, 09:48 PM
I'm looking for a way to set DOS environment variables from C++. I've tried "_putevn" but found it's only good for the program thread environment.

Franky Braem
April 19th, 1999, 07:27 AM
You can use this API function :

BOOL SetEnvironmentVariable(
LPCTSTR lpName, // address of environment variable name
LPCTSTR lpValue // address of new value for variable
);