
我正在製作一個小批次檔來更改一些網路適配器設定:
誰能解釋為什麼這有效:
netsh interface ipv4 set address name="Local Area Connection" static 192.168.1.11 255.255.255.0 192.168.1.1
然而這並不是(它修改了 IP、子網,但沒有對網關進行任何更改):
set /p FIRSTIP=Please type the IP address provided:
set /p SUBNETIP=Please type the Subnet IP provided:
set /p DFTGATEWAY=Please type the Gateway provided:
netsh interface ipv4 set address name="Local Area Connection" static %FIRSTIP% %SUBNETIP% %GATEWAY%
這是在 Windows 10 電腦上。我一直對這個問題摸不著頭腦,大多數知識庫文章似乎沒什麼幫助。