日期:2014-05-17 浏览次数:20910 次
@echo off color 0a mode con cols=90 sc config winmgmt start= auto >nul 2<&1 ::net start winmgmt 2>1nul setlocal ENABLEDELAYEDEXPANSION echo IP地址: for /f "tokens=1,* delims==" %%a in ('ipconfig^|find "IP Address"') do ( set /a tee+=1 echo %%a %%b ) set tee=0 echo. echo CPU: for /f "tokens=1,* delims==" %%a in ('wmic cpu get name^,ExtClock^,CpuStatus^,Description /value') do ( set /a tee+=1 if "!tee!" == "3" echo CPU个数 = %%b if "!tee!" == "4" echo 处理器版本 = %%b if "!tee!" == "5" echo 外 频 = %%b if "!tee!" == "6" echo CPU主频率 = %%b ) for /f "tokens=2 delims==" %%a in ('wmic path Win32_PerfFormattedData_PerfOS_Processor get PercentProcessorTime /value^|findstr "PercentProcessorTime"') do ( set UseCPU=%%a ) echo CPU使用率:%UseCPU%%% set tee=0 echo. echo 硬 盘: for /f "tokens=1,* delims==" %%a in ('wmic DISKDRIVE get model^,interfacetype^,size^,totalsectors^,partitions /value') do ( set /a tee+=1 if "!tee!" == "6" echo 总 空 间 = %%b if "!tee!" == "7" echo 已 用 空 间 = %%b ) echo. echo 内 存: for /f "tokens=1,* delims==" %%a in ('systeminfo^|find "物理内存"') do ( echo %%a %%b ) echo. echo 处 理 器: for /f "tokens=1,* delims==" %%a in ('systeminfo^|find "处理器"') do ( echo %%a %%b ) echo. pause
------解决方案--------------------