Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: How can I create a new ENV in Perl

by BillKSmith (Chaplain)
on Apr 01, 2013 at 12:48 UTC ( #1026479=note: print w/ replies, xml ) Need Help??


in reply to Re: How can I create a new ENV in Perl
in thread How can I create a new ENV in Perl

I doubt that it would help to set the variable directly in the registry. You need to change the registry the same way that the control panel does when it creates new variable. Good luck finding that.

Bill


Comment on Re^2: How can I create a new ENV in Perl
Re^3: How can I create a new ENV in Perl
by Corion (Pope) on Apr 01, 2013 at 19:06 UTC

    In the MSDN article I conveniently linked, there is the following paragraph:

    Calling SetEnvironmentVariable has no effect on the system environment variables. To programmatically add or modify system environment variables, add them to the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment registry key, then broadcast a WM_SETTINGCHANGE message with lParam set to the string "Environment". This allows applications, such as the shell, to pick up your updates.

    From that, I would assume that no luck is needed in finding the appropriate place.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1026479]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2014-07-10 04:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (199 votes), past polls