联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
Originally posted by pan163 at 2007-11-30 01:10 PM: 好东西,,,,有一个问题,MAC和IP地址是用什么软件或工具读出来呢?人工一个个改???
@Echo off Title 收集你的机器的 计算机名.IP.MAC为刻盘自动改IP做准备by 彬 QQ43142691 For /f "tokens=16" %%a in ('ipconfig/all^|find /i "Host Name"') do (set PcName=%%a) For /f "tokens=15" %%i in ('ipconfig^|find /i "ip address"') do (set ip=%%i) For /f "tokens=12" %%b in ('ipconfig/all^| find /i "Physical Address"') do (set mac=%%b) if not exist new.ini goto new For /f "tokens=3" %%m in ('type new.ini^|find /i /n "%mac%"') do (set fm=%%m) if not "%fm%"=="" exit :ok Echo.%PcName% %ip% %mac% >>new.ini Exit :new Echo.**********开始收集咯*******>>new.ini goto ok
@echo off color 0a call :getme "ip address" "ip" call :getme "Physical Address" "mac" call :getme "Default Gateway" "gateway" goto begin :getme for /f "tokens=2 delims=:" %%i in ('ipconfig /all^|findstr /i /c:%1') do if not "!%~2!" == "" set "%~2=%%i" goto :eof :begin echo -%ip%-%mac%-%gateway%- pause exit