Environment variables *should* be inherited from the creating process to the child process, though I believe the Win32API makes that optional. Once the child process is created it has its own environment variables that can be adjusted internally (and SET is a built-in from CMD for that reason), but are not generally able to be changed by external processes. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
On 26 October 2011 10:28, Greg Keogh <[email protected]> wrote: > Chaps, I think I’ll abandon this experiment again. I’m not happy with the > way the new function stuffs your values into the HKCU or HKLM hives and the > values are not instantly available to the caller. I just wanted to knock up > a bit of code which did the same thing as the SET command, but it doesn’t > seem possible. Perhaps I could cheat and look inside the SET command and set > what API calls it’s making. I’ll bet it’s just manipulating some secret > collection. Where is the SET command binary image? Can anyone disassemble > it? – Greg
