PDA

View Full Version : setting environment variables in Win2000


loked
01-21-2004, 11:12 PM
Hey,

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 :)

Thanks!

later:wavey:
loked

dAfTiE
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.

loked
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.

Thanks anyway!

later:wavey:
loked

dAfTiE
01-25-2004, 10:29 PM
this might be of some use for you,if you're looking at using perl.
http://www.geocities.com/SiliconValley/Park/8312/regexts.htm

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:
http://search.cpan.org/search%3fmodule=Win32API::Registry

loked
01-25-2004, 10:45 PM
That looks exactly like what I was looking for. Thanks alot!! :)

later:wavey:
loked

CGTalk Moderation
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.