I already have a code set up to check a combo box for a value and change the ip , subnet, and gateway depending on the value.
What I want to do is reset the lan back to the dhcp when the program is closed.
I have searched and have not been able to find how to do this.

Or maybe I am explaining it incorrectly.
under the tcp/ip properties I am trying to set it back to "obtain Ip address automatically"

I know how to use netsh but I don't want to call a batch.

Any takers?