Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > how set the PATH environment variable to server machine through myapplication?

Reply
Thread Tools

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

 
 
chandan
Guest
Posts: n/a
 
      01-08-2008
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
 
Reply With Quote
 
 
 
 
Ravi
Guest
Posts: n/a
 
      01-08-2008
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
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How to set another machine's environment variable? vinay.babu Software 0 10-16-2008 11:54 AM
How can I set the PATH environment variable to server machine inasp.net ? chandan ASP .Net 1 01-08-2008 07:52 AM
Setting an environment variable from another environment variable marcwentink@hotmail.com Java 5 04-04-2007 10:39 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57