这一段批处理文件是什么意思?
来源:百度知道 编辑:UC知道 时间:2024/05/19 07:25:56
文件名 "macdown.bat"
@echo off
ipconfig /all >ipconfig.txt
find "Default Gateway" ipconfig.txt >GateIP.txt
for /f "skip=2 tokens=13" %%G in (GateIP.txt) do set GateIP=%%G
arp -d %GateIP%
if exist ipconfig.txt del ipconfig.txt
if exist GateIP.txt del GateIP.txt
exit
还有下面一段
macup.bat
@echo off
ipconfig /all >ipconfig.txt
find "Default Gateway" ipconfig.txt >GateIP.txt
for /f "skip=2 tokens=13" %%G in (GateIP.txt) do set GateIP=%%G
arp -a %GateIP% >GateMac.txt
for /f "skip=3 tokens=2" %%H in (GateMac.txt) do set GateMac=%%H
arp -s %GateIP% %GateMac%
if exist ipconfig.txt del ipconfig.txt
if exist GateIP.txt del GateIP.txt
if exist GateMac.txt del GateMac.txt
exit
这两个文件是要干什么啊?这是方正宽带的客户端里面的,绑定MAC地址跟这个有关么?
@echo off
ipconfig /all >ipconfig.txt
find "Default Gateway" ipconfig.txt >GateIP.txt
for /f "skip=2 tokens=13" %%G in (GateIP.txt) do set GateIP=%%G
arp -d %GateIP%
if exist ipconfig.txt del ipconfig.txt
if exist GateIP.txt del GateIP.txt
exit
还有下面一段
macup.bat
@echo off
ipconfig /all >ipconfig.txt
find "Default Gateway" ipconfig.txt >GateIP.txt
for /f "skip=2 tokens=13" %%G in (GateIP.txt) do set GateIP=%%G
arp -a %GateIP% >GateMac.txt
for /f "skip=3 tokens=2" %%H in (GateMac.txt) do set GateMac=%%H
arp -s %GateIP% %GateMac%
if exist ipconfig.txt del ipconfig.txt
if exist GateIP.txt del GateIP.txt
if exist GateMac.txt del GateMac.txt
exit
这两个文件是要干什么啊?这是方正宽带的客户端里面的,绑定MAC地址跟这个有关么?
做MAC地址绑定的,它可以自动读取你电脑上的网关地址,及网关MAC地址.
"macdown.bat" 清除已有的网关的绑定
macup.bat 绑定网关MAC地址
好的批处理
用到DOS 里的环境变量