There are two ways, one is going directly to the REGISTRY, there is an entry for all the variables you see in the "environment variables" dialog, you will probably need to be logged as administrator for that. Look MSDN for more info. The other way is to use the WMI API to access that in a more transparent way, but with overall same results. WMI is well documented (although it is an extensive API) in MSDN. HTH 2007/11/14, wouter van ooijen : > > > Windows 2000, XP, Vista go to system settings (right-click on > > "(My) Computer"->Preferences->Advanced, click the > > "Environment Variables. You can change path for your current > > account only or system-wide. > > OK, but how to do that automatically, in a script? > > Wouter van Ooijen > > -- ------------------------------------------- > Van Ooijen Technische Informatica: www.voti.nl > consultancy, development, PICmicro products > docent Hogeschool van Utrecht: www.voti.nl/hvu > > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- Ariel Rocholl Madrid, Spain -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist