On 6/3/05, Malcolm Anderson <[EMAIL PROTECTED]> wrote: > is there a way to set up environment variables programatically? I'm working > with a bunch of people who are not used to using NAnt, and I'd like to be able > to just hit them with an install script that will set their path and > environment variables for any future cmd window. > > Thanks > > Malcolm
All system environment variables are stored in the registry: HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment Similarly, user environment variables in HKCU\SYSTEM\Current... (HKLM / HKCU are abbreviations for HKEY_LOCAL_MACHINE and HKEY_LOCAL_USER, respectively). Can this be done programatically? Yes. Do I know of any simple tools to do this? Except for creating a .reg file for your developers to import, I don't know of any (creating a .reg file is easy, just right-click the key and choose export, then you can clean up the file contents by hand if required). There was some noise on the list earlier about a task to set environment variables, but I don't recall if anyone actually wrote the task... Regards, -- Troy ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ Nant-users mailing list Nant-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users