
CODE: [Copy to clipboard]@echo off&set connectionname=本地连接&set gw=
for /f "skip=2 tokens=1,2 delims==" %%a in ('find /i "%computername%" %~nx0) do (
if not "%%a%%b" == "" (
netsh interface ip set address "%connectionname%" static %%b 255.255.255.0 %gw%)
)
goto :eof
以下为配置
computer001=192.168.1.1
...
| Quote: | |
|
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |