@echo off
@if %1* neq 0* mshta vbscript:createobject("wscript.shell").run("%~s0 0",0)(window.close)&exit
set IP=10.194.1.89
set SUB=255.255.255.128
set GW=10.194.1.125
set DNS1=168.95.1.1
set DNS2=168.95.192.1
netsh interface ip set address name="區域連線" static %IP% %SUB% %GW% 1
netsh interface ip set dns name="區域連線" static %DNS1%
netsh interface ip add dns name="區域連線" %DNS2%
exit
—————————————————————————–
@echo off
netsh interface ip set address name="區域連線" dhcp
netsh interface ip set dns name="區域連線" Source=dhcp
——————————————————————————
@echo off
@if %1* neq 0* mshta vbscript:createobject("wscript.shell").run("%~s0 0",0)(window.close)&exit
set IP=10.194.1.89
set SUB=255.255.255.0
set GW=10.194.1.1
set DNS1=168.95.1.1
set DNS2=168.95.192.1
netsh interface ip set address name="區域連線" static %IP% %SUB% %GW% 1
netsh interface ip set dns name="區域連線" static %DNS1%
netsh interface ip add dns name="區域連線" %DNS2%
exit