[kw-pm] Environment Variables

John Macdonald john at perlwolf.com
Wed Jun 10 13:54:28 PDT 2009


On Wed, Jun 10, 2009 at 10:29:42AM -0700, Robert Pike wrote:
> 
> Simple question to answer for you I'm sure. How can I set up an environment variable on Windows 2003 so I can access it through the $ENV variable? Thanks.

If you're using cygwin, I believe it works just the same as on a
Unix/Linux system:

    VAR=value program

for setting VAR just for a single run; or:

    export VAR=value
    ...
    perl program
    ...
    perl program

to set VAR for a series of runs.  I'm sure it will also have a
profile file in which you can place such settings so that they
get re-created every time you start up your computer.

There's probably some interaction you can do with the registry
to do the same withuot using cygwin, but I've managed to avoid
having to do serious work on a toy OS so I've never had to learn
its oddities.  (I've got enough oddities of my own to worry
about already. :-)


More information about the kw-pm mailing list