C
ceh
Hi, I'm using c# vs 2005 win xp pro sp2.
I create a cmd prompt with pInvoke via CreateProcessWithLogonW
Taskmgr shows that cmd instance running as that user.
I type set in that cmd window and it shows me the env vars.
Most importantly, it also shows a custom env var I have set.
Later, I open that proc via
StringDictionary env = myProcess.StartInfo.EnvironmentVariables;
I look at this value in the debugger and all it over shows me is the
standard system env vars.
It never shows me the ones that the process actually has.
It's as though, MS just opens the registry env vars for the user
profile and returns that when myProcess.StartInfo.EnvironmentVariables
is called.
Does anyone know if this is the case?
If so, myProcess.StartInfo.EnvironmentVariables, is lying to us.
Can anyone shed some light?
Thanks.
I create a cmd prompt with pInvoke via CreateProcessWithLogonW
Taskmgr shows that cmd instance running as that user.
I type set in that cmd window and it shows me the env vars.
Most importantly, it also shows a custom env var I have set.
Later, I open that proc via
StringDictionary env = myProcess.StartInfo.EnvironmentVariables;
I look at this value in the debugger and all it over shows me is the
standard system env vars.
It never shows me the ones that the process actually has.
It's as though, MS just opens the registry env vars for the user
profile and returns that when myProcess.StartInfo.EnvironmentVariables
is called.
Does anyone know if this is the case?
If so, myProcess.StartInfo.EnvironmentVariables, is lying to us.
Can anyone shed some light?
Thanks.