呃,你做个批处理不就好了?参考
http://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&tn=monline_4_dg&wd=netsh%20interface%20ip&rsv_pq=ac59eed10001977b&rsv_t=0f08IzA5N8OuzCgBGsWyhvW7zXQADvrK6Rxh3vdxRL8y3dG%2BVsABhHBNRbw%2B%2FeEcJPMr&rsv_enter=1&inputT=1254&rsv_sug1=34&rsv_sug3=29&rsv_sug2=0&rsv_sug4=1639
netsh interface ip set address name="本地连接" gateway=192.168.1.1 gwmetric=0
netsh interface ip set dns name="本地连接" source=static addr=202.102.102.102 register=primary