本帖最后由 smss 于 2020-6-23 13:30 编辑
栗子- @echo off
- :Cho
- cls
- echo 1.复制软件 A.获取电脑信息
- choice /C:1234567890ABCDEFGHIJKL /N /M ">>输入选择>
- goto %errorlevel%
- :1
- for %%i in (CPU-Z GPU-Z SSD-Z HDTune 测显示器 键盘检测 硬盘检测 硬盘测速 硬件检测) do if not exist "%userprofile%\desktop\电脑检测\%%i.exe" copy "%~dp0工具\检测\%%i.exe" "%userprofile%\desktop\电脑检测\"
- goto Cho
- :11
- echo 登录名:%USERNAME%
- echo 计算机名:%COMPUTERNAME%
- for /f "tokens=2 delims==" %%a in ('wmic os get caption /value ^| findstr /i "caption"') do echo 操作系统:%%a
- for /f "tokens=2 delims==" %%a in ('wmic csproduct get Vendor /value ^| findstr /i "Vendor"') do echo 制造商:%%a
- for /f "tokens=2 delims==" %%a in ('wmic csproduct get Name /value ^| findstr /i "Name"') do echo 电脑型号:%%a
- for /f "tokens=2 delims==" %%a in ('wmic csproduct get IdentifyingNumber /value ^| findstr /i "IdentifyingNumber"') do echo SN序列号:%%a
- for /f "tokens=2 delims==" %%a in ('wmic cpu get Name /value ^| findstr /i "Name"') do echo 处理器:%%a
- for /f "tokens=2 delims==" %%i in ('Wmic Path Win32_VideoController Get Name^,AdapterRam^,AdapterCompatibility^,DriverDate^,DriverVersion^,VideoProcessor /Value') do (set /a N+=1
- if !N! == 1 set AdapterCompatibility=%%i
- if !N! == 2 set AdapterRam=%%i
- if !N! == 3 set DriverDate=%%i
- if !N! == 4 set DriverVersion=%%i
- if !N! == 5 set Name=%%i
- if !N! == 6 set VideoProcessor=%%i
- )
- echo 显卡信息:%Name%
- for /f "tokens=2 delims==" %%a in ('wmic memorychip get Capacity /value ^| findstr /i "Capacity"') do echo 内存容量:%%a
- for /f "tokens=2 delims==" %%a in ('wmic DiskDrive get Size /value ^| findstr /i "Size"') do echo 硬盘容量:%%a
- goto Cho
复制代码
|