471,570 Members | 1,102 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,570 software developers and data experts.

About IP Problem !!

Hi there,

How should I do if I want to release/renew IP in C# ?

Thanks!!

Best regards,
Paul
Dec 6 '05 #1
2 1792
Try This:

private void RenewIpConfig()
{
System.Diagnostics.Process p = new
System.Diagnostics.Process();
System.IO.StreamWriter sw;
System.IO.StreamReader sr;
System.IO.StreamReader err;

System.Diagnostics.ProcessStartInfo psI = new
System.Diagnostics.ProcessStartInfo("cmd");
psI.UseShellExecute = false;
psI.RedirectStandardInput = true;
psI.RedirectStandardOutput = true;
psI.RedirectStandardError = true;
psI.CreateNoWindow = true;
p.StartInfo = psI;

p.Start();
sw = p.StandardInput;
sr = p.StandardOutput;
err = p.StandardError;

sw.AutoFlush = true;
sw.WriteLine("ipconfig /renew");
sw.Close();

System.Diagnostics.Debug.WriteLine("Returned Info: " +
sr.ReadToEnd());
System.Diagnostics.Debug.WriteLine("Errors: " +
err.ReadToEnd());
}

Dec 6 '05 #2
Hi,
I think that opennetcf.org has some code for this, check it out
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"MingChih Tsai" <mj*@seed.net.tw> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
Hi there,

How should I do if I want to release/renew IP in C# ?

Thanks!!

Best regards,
Paul

Dec 6 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by eScrewDotCom | last post: by
220 posts views Thread by Brandon J. Van Every | last post: by
8 posts views Thread by eScrewDotCom | last post: by
5 posts views Thread by eScrewDotCom | last post: by
reply views Thread by eScrewDotCom | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by Vinnie | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.