本帖最后由 yakeyun 于 2022-7-25 14:34 编辑
回复 4# qixiaobin0715
内存数量和每条内存信息会对不上- @echo off & setlocal enabledelayedexpansion
- cd /d "%~dp0"
-
- for /f "tokens=4* delims=:" %%a in ('type "ComputerZ_HardwareDll.log" ^|find/i "[overviewinfowrapper] CPUName :"') do if not defined %%a set "%%a=%%a" & set CPUName=%%a
-
- for /f "tokens=4* delims=:" %%a in ('type "ComputerZ_HardwareDll.log" ^|find/i "[processmemory] Spd count:"') do set MemoryNumber=%%a
- for /f "tokens=4* delims==" %%a in ('type "ComputerZ_HardwareDll.log" ^|find/i "[processmemory] SpdOverview.0"') do set Memory0Name=%%a
- for /f "tokens=4* delims==" %%a in ('type "ComputerZ_HardwareDll.log" ^|find/i "[processmemory] SpdOverview.1"') do set Memory1Name=%%a
- for /f "tokens=4* delims==" %%a in ('type "ComputerZ_HardwareDll.log" ^|find/i "[processmemory] SpdOverview.1"') do set Memory2Name=%%a
- for /f "tokens=4* delims==" %%a in ('type "ComputerZ_HardwareDll.log" ^|find/i "[processmemory] SpdOverview.1"') do set Memory3Name=%%a
-
- for /f "tokens=2* delims==" %%a in ('type "ComputerZ_HardwareDll.log" ^|find/i "[gpuprocesser] VideoAdapter"') do if not defined %%a set "%%a=%%a" & set VideoAdapter=%%a
-
- for /f "tokens=4* delims=:" %%a in ('type "ComputerZ_HardwareDll.log" ^|find/i "[motherboardinfowrapper] GetMotherboardInfo:"') do if not defined %%a set "%%a=%%a" & set MotherboardInfo=%%a
-
- for /f "tokens=4* delims=:" %%a in ('type "ComputerZ_HardwareDll.log" ^|find/i "[monitorinfowrapper] find primary monitor"') do if not defined %%a set "%%a=%%a" & set monitor=%%a
-
- for /f "tokens=4* delims=:" %%a in ('type "ComputerZ_HardwareDll.log" ^|find/i "[disk_client] PrimarayDiskModel:"') do if not defined %%a set "%%a=%%a" & set Diskinfo=%%a
-
- for /f "tokens=2* delims==" %%a in ('type "ComputerZ_HardwareDll.log" ^|find/i "[networkinfo] GetNetworkInfo: NetworkParams.strDescription[0] ="') do if not defined %%a set "%%a=%%a" & set Network0=%%a
- for /f "tokens=2* delims==" %%b in ('type "ComputerZ_HardwareDll.log" ^|find/i "[networkinfo] GetNetworkInfo: NetworkParams.strDescription[1] ="') do if not defined %%b set "%%b=%%b" & set Network1=%%b
- for /f "tokens=2* delims==" %%c in ('type "ComputerZ_HardwareDll.log" ^|find/i "[networkinfo] GetNetworkInfo: NetworkParams.strDescription[2] ="') do if not defined %%c set "%%c=%%c" & set Network2=%%c
-
- for /f "tokens=2* delims=@" %%a in ('type "ComputerZ_HardwareDll.log" ^|find/i "[audioinfo] Multimedia(Hi-definition Audio):"') do if not defined %%a set "%%a=%%a" & set audioinfo=%%a
-
- set CPUName
- set MemoryNumber
- set Memory0Name
- set Memory1Name
- set Memory2Name
- set Memory3Name
- set VideoAdapter
- set MotherboardInfo
- set monitor
- set Diskinfo
- set Network0
- set Network1
- set Network2
- set audioinfo
-
- pause
复制代码
|