View Full Version : setting environment variables in Win2000
01-21-2004, 11:12 PM
I'd like to setup my win2000 global environment variables through the command prompt or a perl command. I know I can set them up using the system tab, but I want to be able to automate it with a script and change from a script.
Please if anyone knows how to do this, please help :)
01-25-2004, 08:21 PM
Try something like set VARIABLE_NAME=VALUE ,
and then type in set to list all environment variables to check that it's there.
01-25-2004, 09:27 PM
Thanks Daftie, but I forgot to mention that doing it that way from the command prompt doesnt store your variable through sessions. So if I close that command prompt and open a new one my variable is lost. I want to be able to store one the same way I store a system variable from the system tab. So I can even reboot and it will store it for me.
01-25-2004, 10:29 PM
this might be of some use for you,if you're looking at using perl.
Might have changed some for current perl version,
but that should be doable to figure out.
The win32 module prolly has what you need...
Never really looked into it,as I'm just a lowly perl noob,
but I would imagine that's the place to look for this stuff.
Might look at one of these:
01-25-2004, 10:45 PM
That looks exactly like what I was looking for. Thanks alot!! :)
01-17-2006, 06:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.