|
-
May 2nd, 2008, 01:55 AM
#3
Re: Running dos command from c#
 Originally Posted by MikeVallotton
I think
Code:
Process netshProcess = new Process();
netshProcess.StartInfo.FileName = "netsh";
netshProcess.StartInfo.Arguments = "interface ip set address local static 192.168.2.251 255.255.255.0 192.168.2.251 1";
netshProcess.Start();
Should work.
Have to make sure netsh is in the path for the user context the program is running in, too.
Thanks for the reply. I did manage to find the solution and it is similar to what you have supplied.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|