该代码源于网上收集,在此整理分享。
快速查看计算机参数配置信息
直接将代码保存为bat,直接执行。
主要包括计算机以下详细信息:
System Information、DisplayCard
Mother Board、Hard Disk、Network Card
Software Information、USB Information
Users、FileShare Information
@echo off
color 57
title HardSoft Viewer
mode con cols=67 lines=42
setlocal ENABLEDELAYEDEXPANSION
echo Prepare For View ...
del /f "%TEMP%\temp.txt" 2>nul
dxdiag /t %TEMP%\temp.txt
del /f "%COMPUTERNAME%.txt" 2>nul
echo Start Hardware Viewer ...
echo System Information: >>%COMPUTERNAME%.txt
:system
rem This must 30s
if EXIST "%TEMP%\temp.txt" (
for /f "tokens=1,2,* delims=:" %%a in ('findstr /c:" Machine name:" /c:" Operating System:" /c:" System Model:" /c:" Processor:" /c:" Memory:" /c:" Card name:" /c:"Display Memory:" "%TEMP%\temp.txt"') do (
set /a tee+=1
if !tee! == 1 echo Computer Name = %%b>>%COMPUTERNAME%.txt
if !tee! == 2 echo OS Type = %%b>>%COMPUTERNAME%.txt
if !tee! == 3 echo System Model = %%b>>%COMPUTERNAME%.txt
if !tee! == 4 echo CPU Model = %%b>>%COMPUTERNAME%.txt
if !tee! == 5 echo RAM Size = %%b>>%COMPUTERNAME%.txt
if !tee! == 6 echo.>>%COMPUTERNAME%.txt
if !tee! == 6 echo DisplayCard : >>%COMPUTERNAME%.txt
if !tee! == 6 echo Display Card = %%b>>%COMPUTERNAME%.txt
if !tee! == 7 echo DisplayMemory = %%b>>%COMPUTERNAME%.txt
) ) else (
ping /n 2 127.1>nul
goto system
)
set tee=0
echo.>>%COMPUTERNAME%.txt
echo Mother Board:>>%COMPUTERNAME%.txt
for /f "tokens=1,* delims==" %%a in ('wmic BASEBOARD get Manufacturer^,Product^,Version^,SerialNumber /value') do (
s