You could try via cmd script.
"Using the add-on tool Setx.exe
It is not part of the standard Windows XP setup but a command-line tool called setx.exe is included in the Windows XP Service Pack 2 Support Tools. This tool extends the set command so that permanent changes in the environment variables can be made. For example, to add a folder C:\New Folder to the path, the command would be
setx path "%PATH%;C:\New Folder" "
http://vlaurie.com/compute
This command-line tool offers a batch method for setting environmental variables in the user or system environment and requires no programming or scripting. In addition to taking an environmental variable and its associated value from the command line, it can also get the values of registrykeys and write them to text files.
Here is a python script here to accomplish that -> http://aspn.activestate.co
As well you could try a registry approach
Environment variable
http://community.installsh
http://community.installsh
#define WM_SETTINGCHANGE 0x001A
#define WM_WININICHANGE 0x001A
#define HWND_BROADCAST 0xffff
SendMessage(HWND_BROADCAST
RegDBSetDefaultRoot(HKEY_L
szKey = "SYSTEM\\CurrentControlSet
//"Successfully Updated Environment Variable
// Flush the NT registry to all applications.
szEnv = "Environment";
pEnv = &szEnv;
SendMessage (HWND_BROADCAST, WM_WININICHANGE, 0, pEnv );
Environment Variable Not Showing Until Reboot
http://community.installsh
You can do the registry manipulation probably, but realize you also need to call SendMessage to broadcast the settings change. This is really old school ISPro5 approach.
System Env data is stored at:
HKLM\SYSTEM \CurrentControlSet\Control
Main Topics
Browse All Topics





by: Shift-3Posted on 2007-12-06 at 08:55:07ID: 20421083
You can do this using vbscript. See these articles for examples: echnet/scr iptcenter/ resources/ qanda/mar0 5/hey0318. mspx echnet/scr iptcenter/ resources/ qanda/aug0 6/hey0828. mspx
http://www.microsoft.com/t
http://www.microsoft.com/t