Want to build a C# app that can release/renew IP with a button click

Bruce Barfield 0 Reputation points
2023-07-09T18:14:41.3933333+00:00

I have been looking for a way to use a C# app to release/renew IP with a button click.

So far many methods are not working and I get errors or told code isn't valid. I'm no longer sure what methods to use/classes etc. Any help would be appreciated.

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,185 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,818 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 86,481 Reputation points
    2023-07-09T21:54:59.6133333+00:00

    Use Process.Start (with "cmd /C ipconfig /renew" for example)

    (or others methods like WMI with RenewDHCPLease, IpRenewAddress , ...)

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.