内存数量容量显示:
@echo off
for /f "delims=^ tokens=*" %%a in ('wmic memorychip get BankLabel^| find /i "BANK "') do echo,%%a >a1.ini
for /f "tokens=1,2" %%b in (a1.ini) do echo,%%c
for /f "skip=1 delims=^ tokens=*" %%d in ('wmic memorychip get Capacity') do echo,%%d
pause>nul
exit
@echo off
setlocal enabledelayedexpansion
(for /f "delims=^ tokens=*" %%a in ('wmic memorychip get BankLabel^| find /i "BANK "') do echo,%%a) >a1.ini
for /f "tokens=1,2" %%b in (a1.ini) do echo,内存数量:%%c
for /f "skip=1 delims=^ tokens=*" %%d in ('wmic memorychip get Capacity') do echo,%%d & set gb = %%d
set /a GB=gb/1024/1024/1024
echo,内存容量:%GB% GB
pause>nul
exit