Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C#
select "Obtain DNS Server addresses automatically" in Local Area Connection...[^]
Posted 16-Jan-13 3:56am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can use WMI for that. See this article for general interface settings manipulation: Configuring TCP/IP Settings using WMI and C#[^]. Use EnableDHCP[^] method.
If you don't want to write such "complicated" code, you can also call NETSH. See:[^]
samadblaj at 16-Jan-13 10:08am
do not using?
Zoltán Zörgő at 16-Jan-13 12:42pm
why not?
Zoltán Zörgő at 16-Jan-13 12:56pm
you can use netsh also. see update.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web01 | 2.8.141015.1 | Last Updated 16 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100