Re: Setting Windows Environment Variables

Thanks to everyone for your input. I will investigate other routes. ( :

Still thinking in Ant you see!

Regards

Gemma Cameron


This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.


Have a look at this

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/environment_variables.asp

and then here

http://www.ruby-doc.org/stdlib/libdoc/Win32API/rdoc/classes/Win32/Registry/API.html

You might be in luck.

cheers
lyndon

On 8/15/06, Lyndon S. [email protected] wrote:

You might be in luck.

Not really. You can’t change the environment of an already running
process that isn’t yourself. Even if one were to go into the System
control panel and change the environment variables, any shortcut
launchers (as I often use) will themselves need to be relaunched to
take advantage of the updated environment variables. Certainly, there
must be a way to refresh the internal environment variable table based
on the current registry settings, but that would be based on a global
signal.

I’m not sure what the OP’s post about thinking in “ant” is, because
Ant would be similarly limited. This is not a Ruby limitation; it is
one of the few limitations that is essentially cross-platform and
found on every platform in existence to the best of my knowledge. The
only reason that shell script functions and DOS/Winodws batch files
can affect the current level’s environment variables is that they are
not in a separate process and are therefore just modifying the current
process’s environment variables.

-austin

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs