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.
Printable View
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.
You can use this API function :
BOOL SetEnvironmentVariable(
LPCTSTR lpName, // address of environment variable name
LPCTSTR lpValue // address of new value for variable
);