如果楼主有WiFi环境,测试一下Netsh
echo 手动设置IP地址....
Netsh interface IP Set Addr "wlan" Static 192.168.1.97 255.255.255.0 192.168.1.1 1
echo 手动设置DNS地址....
Netsh interface IP Set dns "wlan" static 229.118.104.62 primary
Echo 设置成功
netsh wlan add profile filename="%~dp0TP-Link_415c8.xml"
netsh wlan connect name="TP-Link_415c8"
netsh wlan show interfaces
echo 自动获取IP地址....
netsh interface ip set address name = "以太网" source = dhcp
echo 自动获取DNS服务器....
netsh interface ip set dns name = "以太网" source = dhcp
Echo 自动获取IP成功
echo 手动设置IP地址....
Netsh interface IP Set Addr "以太网" Static 192.168.1.97 255.255.255.0 192.168.1.1 1
echo 手动设置DNS地址....
Netsh interface IP Set dns "以太网" static 229.118.104.62 primary
Echo 设置成功