user470760
user470760

Reputation:

WMI vs NETSH for Adding IP's to NIC with C#?

I am writing a small tool to simplify some of the stuff I do at work day to day, and the Windows GUI for adding IP's to the NIC is horrid. I am looking to find a decent way to...

I found Configuring TCP/IP Settings using WMI and C# and THIS snippet for adding an IP to the NIC using netsh. What would be the best way to approach this and would solution should I use to do it?

Upvotes: 0

Views: 995

Answers (1)

Desnoxav
Desnoxav

Reputation: 354

I had the same problem and after some research i choose WMI.

I think netsh is better if you use the script alone (i means not in a code). Personnaly i want to configure NIC in a c# code so WMI look more practical and i's quite easy to use it with a config file made in xml.

Upvotes: 1

Related Questions