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
>
|