Setting an environment variable

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • beaker

    #1

    Setting an environment variable


    Hi,

    I want to be able to add to the PATH environment variable in one of my
    programs. Is there a way to do this? I know how to check the path
    using Environment.Get EnvironmentVari able("path"), just can't work out
    how to add to it!

    Thanks,

    Gary
  • kHSw

    #2
    Re: Setting an environment variable

    You can do this using the registry (Microsoft.Win3 2.registry). You can find
    the keys to modify at http://support.microsoft.com/kb/q104011/

    In .NET 2.0 you could just use Environment.Set EnvironmentVari able()

    --



    Comment

    Working...