- @echo off
- for /f "tokens=2 delims==" %%i in ('wmic cpu get name /value') do for /f "tokens=*" %%i in ("%%i") do set cpu=%%i
- for /f "delims=" %%i in ('mshta "javascript:new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).Write('%cpu:@=%'.replace(/[^ ]*Hz$/ig,''));close()"') do set cpu=%%~nxi
- echo %cpu%
- pause
复制代码
|