netsh interface ip set address name="本地连接" source=static addr=192.168.100.100 mask=255.255.255.0 gateway=192.168.100.1 gwmetric=auto
netsh interface ip set address name="本地连接" source=dhcp
参考:
- http://www.blogjava.net/qujinlong123/archive/2007/06/20/125434.html(这里还有python调用WMI的实现)