how set the PATH environment variable to server machine through myapplication?

Discussion in 'ASP .Net Web Services' started by chandan, Jan 8, 2008.

  1. chandan

    chandan Guest

    I want to set the PATH environment variable to server machine through
    my application. I am using ASP.net 2.0 and language C#.

    Thanks in advance!
    Chandan
    chandan, Jan 8, 2008
    #1
    1. Advertising

  2. chandan

    Ravi Guest

    RE: how set the PATH environment variable to server machine through my

    Hello,

    You can use the following code to change any environment variable.

    Environment.SetEnvironmentVariable("PATH","Your value goes here");

    Also you can restore the orginial PATH value before program end.

    string str = Environment.GetEnvironmentVariable("PATH");

    Environment.SetEnvironmentVariable("PATH","Your value goes here");

    before program end,

    Environment.SetEnvironmentVariable("PATH",str);

    Ravi





    "chandan" wrote:

    > I want to set the PATH environment variable to server machine through
    > my application. I am using ASP.net 2.0 and language C#.
    >
    > Thanks in advance!
    > Chandan
    >
    Ravi, Jan 8, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    582
    Oliver Wong
    Jul 13, 2006
  2. Replies:
    5
    Views:
    650
  3. chandan
    Replies:
    1
    Views:
    369
    Naraendirakumar R.R.
    Jan 8, 2008
  4. adam
    Replies:
    2
    Views:
    235
    Evertjan.
    Jun 1, 2006
  5. Slickuser

    set environment in perl through windows

    Slickuser, Jun 13, 2009, in forum: Perl Misc
    Replies:
    1
    Views:
    264
    J├╝rgen Exner
    Jun 13, 2009
Loading...

Share This Page