in reply to Windows environment variable not set if calling from a perl program

Instead of "set TEST", use "setx", as explained in this stackoverflow article.

        Our business is run on trust. We trust you will pay in advance.

  • Comment on Re: Windows environment variable not set if calling from a perl program

Replies are listed 'Best First'.
Re^2: Windows environment variable not set if calling from a perl program
by BrowserUk (Patriarch) on Dec 08, 2015 at 09:25 UTC

    That is not doing what the OP is expecting; and could cause mysterious problems.

    Rather than simply modifying the current session's environment; it makes persistent changes to the system registry. Which is fine if that is the intent; but dangerous if not.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re^2: Windows environment variable not set if calling from a perl program
by svasa (Initiate) on Dec 08, 2015 at 14:22 UTC
    Sorry, that won't work in my use case. I dont' want to set system-wide envs.