回复 5# jshuanya - @echo off
- setlocal enabledelayedexpansion
- for /f "tokens=1-2 delims==" %%a in ('wmic MemoryChip get Capacity^,Speed /value ^| findstr "="') do (
- if "%%a" == "Capacity" (
- for %%c in (%%b) do (
- set "MemCap=%%c"
- )
- ) else if "%%a" == "Speed" (
- for %%c in (%%b) do (
- set "MemSpd=%%c"
- )
- for /f %%i in ('powershell "!MemCap!/(1024*1024*1024)"') do (
- set "MemCap=%%i"
- )
- echo +++!MemCap!GB+++
- echo +++!MemSpd!+++
- )
- )
- pause
复制代码
|