修改地址
@echo off %1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit set addr=10.10.10.188 set mask=255.255.255.0 set gateway=10.10.10.251 set dns=172.16.0.65 netsh interface ip set address name="мн╠Ф═Э" source=static addr=%addr% mask=%mask% gateway=%gateway% netsh interface ip set dns "мн╠Ф═Э" source=static addr=%dns% ::pause&exit
改成DHCP
@echo off %1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit netsh interface ip set address name="以太网" source=dhcp netsh interface ip set dns name="以太网" source=dhcp ::pause&exit