Q:

Setting environment variables for a specific run of a specific process

Is it possible to set the environment variables of a process "A" in a way that they will be valid only for its current run (process "A" will be started by my process) using C++? 

A:

Assuming you are prepared to rely on the Windows API, when you call the CreateProcess function to launch a process, you have the lpEnvironment parameter. 
Normally you pass NULL which means, use the environment of the creating process. However, you can supply an environment block which will be used by the new process.
The environment block that you pass is a null-terminated block of null-terminated strings. For example:
"MyVar=MyValue\0MyOtheVar=MyOtherValue\0\0"

defines two separate variables.

