in reply to Trying to use [cpan://Win32::Env::Path] to change Windows Path Variable?

If you want the Win32 command for looking at the environment variables:
help set (typing just "set" does what "env" does
help setlocal
will give some info.
The Windows command to see the path is "path".

The Win32 command to append the path is: path = %PATH%;newdir

I don't know why this module isn't working for you, but this "path=" command will work.

I hope that it is clear that when you change the environment PATH variable like this, this only applies only as long as your program or shell that did this is running. The need for something like this is seldom. I am curious as to your application?

  • Comment on Re: Trying to use [cpan://Win32::Env::Path] to change Windows Path Variable?

Replies are listed 'Best First'.
Re^2: Trying to use [cpan://Win32::Env::Path] to change Windows Path Variable?
by matze77 (Friar) on Nov 18, 2009 at 09:07 UTC

    Ok. Thank you. What i want to do is to change the path variable *permanently* and i would like it to do it with perl, since i have to edit some config files and i would like to do this in a single script, if possible I tried it already on the command line (on Win32 shell too, but it only affects the current shell environment ...)...