note
BrowserUk
<p>You'd need to use Win32::API or Inline C to do this. See [http://msdn2.microsoft.com/en-us/library/ms682653(VS.85).aspx|here] where is says:
<blockquote><i>
To programmatically add or modify system environment variables, add them to the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment registry key, then broadcast a WM_SETTINGCHANGE message with lParam set to the string "Environment". This allows applications, such as the shell, to pick up your updates.
</i></blockquote>
<p>No guarentees that a pre-existing shell instance would see your changes though. You might be able to inject code into the parent process to do it, but that's nasty and awkward.
<div class="pmsig"><div class="pmsig-171588">
<hr />
<font size=1 >
<div>Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.</div>
<div>"Science is about questioning the status quo. Questioning authority". </div>
<div>In the absence of evidence, opinion is indistinguishable from prejudice.</div>
<div>[http://news.bbc.co.uk/1/hi/education/6202877.stm|"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."]</div>
</font>
</div></div>
658253
658253