[Mono-dev] [PATCH] System.Environment fixes for Windows
James Mansion
james at mansionfamily.plus.com
Thu Dec 25 06:56:06 EST 2008
Miguel de Icaza wrote:
>> Calling Environment.SetEnvironmentVariable (...,
>> EnvironmentVariableTarget.User) does not notify the OS that a variable
>> has changed.
>> See http://msdn.microsoft.com/en-us/library/ms682653(VS.85).aspx
>>
...
>> * Environment.cs (SetEnvironmentVariable) : Adding a call to
>> internalBroadcastSettingChange to notify Windows that an environment
>> variable has changed.
>>
Apologies that I'm not in a position to verify this - but can I question
this? The broadcast is for
when you change the settings that new processes started by the shell etc
will not, not
for changes to this process' environment. For changing this process'
env, you should
just need to call SetEnvironmentVariable.
The comments at least are a bit misleading.
More information about the Mono-devel-list
mailing list