本帖最后由 dennisle 于 2011-5-24 14:26 编辑
- @ECHO OFF
- SetLocal EnableDelayedExpansion
- FOR /F "tokens=1* delims==" %%A IN ('WMIC BASEBOARD Get Product /Value 2^>NUL') DO (
- IF /I "%%A"=="Product" SET "Model=%%B"
- )
- FOR /F "tokens=1* delims==" %%A IN ('WMIC CPU GET Name /Value 2^>Nul') DO (
- IF /I "%%A"=="Name" SET "Name=%%B"
- )
- ECHO. 主板名稱: %Model%
- ECHO. CPU 名稱: %Name%
- PAUSE
复制代码
|