无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 4245|回复: 17
打印 上一主题 下一主题

有可以在PE下查看原系统IP的工具么?

[复制链接]
1#
发表于 2022-10-20 14:52:16 | 显示全部楼层
要这个?
  1. @echo off
  2. set tempsys=%1
  3. if %1*==* SET TEMPSYS=C:\windows\system32\config\SYSTEM
  4. REG LOAD HKLM\TEMPSYS %tempsys%
  5. set regx=HKLM\TEMPSYS\ControlSet001
  6. echo 计算机名称 >%temp%\temp.txt
  7. for /f "tokens=3" %%c in ('reg query %regx%\Control\ComputerName\ComputerName ^| find /i "computername"') do echo %%c >>%temp%\temp.txt
  8. echo.>>%temp%\temp.txt
  9. echo IP地址>>%temp%\temp.txt
  10. for /f %%c in ('reg query %regx%\Services\Tcpip\Parameters\Interfaces') do (
  11.    for /f "tokens=3" %%d in ('reg query %%c /v ipaddress^|find /i "ipaddress"') do if not %%d*==0.0.0.0\0\0*  echo %%d>>%temp%\temp.txt
  12.   )
  13. echo.>>%temp%\temp.txt
  14. echo 子网掩码>>%temp%\temp.txt
  15. for /f %%c in ('reg query %regx%\Services\Tcpip\Parameters\Interfaces') do (
  16.    for /f "tokens=3" %%d in ('reg query %%c /v subnetmask^|find /i "subnetmask"') do if not %%d*==0.0.0.0\0\0*  echo %%d>>%temp%\temp.txt
  17.   )
  18. echo.>>%temp%\temp.txt
  19. echo 默认网关>>%temp%\temp.txt
  20. for /f %%c in ('reg query %regx%\Services\Tcpip\Parameters\Interfaces') do (
  21.    for /f "tokens=3" %%d in ('reg query %%c /v defaultgateway^|find /i "defaultgateway"') do if not %%d*==\0* echo %%d>>%temp%\temp.txt
  22.   )
  23. echo DNS 服务器>>%temp%\temp.txt
  24. for /f %%c in ('reg query %regx%\Services\Tcpip\Parameters\Interfaces') do (
  25.    for /f "tokens=3" %%d in ('reg query %%c /v nameserver^|find /i "nameserver"') do echo %%d>>%temp%\temp.txt
  26.   )
  27. echo.>>%temp%\temp.txt
  28. REG UNLOAD HKLM\TEMPSYS
  29. cls
  30. type %temp%\temp.txt
  31. echo.
  32. pause
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-6-16 03:31

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表