dbowler
September 12th, 2002, 08:26 PM
Hello,
I am writing a program designed to stuff values into Windows (DOS) environment variables. This is a console application. It wasn't until this afternoon that I discovered that _putenv() modifies the environment for the calling process, but not the underlying OS environment.
Does anyone know a way I can make an API call (or calls) to modify the "master" environment space? I know I can output code to a batch file and then do the batch, but I don't really like the asthetics of that approach. Any assistance on affecting the master environment space from a C++ program would be greatly appreciated.
Thanks. :)
I am writing a program designed to stuff values into Windows (DOS) environment variables. This is a console application. It wasn't until this afternoon that I discovered that _putenv() modifies the environment for the calling process, but not the underlying OS environment.
Does anyone know a way I can make an API call (or calls) to modify the "master" environment space? I know I can output code to a batch file and then do the batch, but I don't really like the asthetics of that approach. Any assistance on affecting the master environment space from a C++ program would be greatly appreciated.
Thanks. :)