Detects hardware batch commands, detects hardware bat, and obtains computer hardware information with one click

Source: Internet
Author: User

Warning: Running bat source code is a dangerous action, if you are unfamiliar, please do not try!

Batch processing language: Simplified Chinese
Licensing method: Free software
Operating Environment: Windows platform

Detects hardware batch commands. One click gets. Double-tap to view

@echo offcolor 0atitle Hardware detectionModeCon cols=90SC config WinMgmtStart= Auto >nul 2<&1Net StartWinMgmt 2>1nulsetlocalenabledelayedexpansionEchoMain version: for/F "tokens=1,* delims=="%%a in (' wmic baseboard get Manufacturer^,product^,version^,serialnumber/value ') Do(Set/A Tee+=1if"!tee!" = = "3"EchoManufacturer =%%bif"!tee!" = = "4"EchoModel =%%bif"!tee!" = = "5"EchoSerial number =%%bif"!tee!" = = "6"EchoVersion =%%b)SetTee=0EchoBIOS: for/F "tokens=1,* delims=="%%a in (' WMIC BIOS get </p> <p>currentlanguage^,manufacturer^,smbiosbiosversion^, Smbiosmajorversion^,smbiosminorversion^,releasedate/value ') Do(Set/A Tee+=1if"!tee!" = = "3"EchoCurrent language =%%bif"!tee!" = = "4"EchoManufacturer =%%bif"!tee!" = = "5"EchoRelease date =%%bif"!tee!" = = "6"EchoVersion =%%bif"!tee!" = = "7"EchoSmbiosmajorversion =%%bif"!tee!" = = "8"EchoSmbiosminorversion =%%b)SetTee=0Echo.EchoCPU: for/F "tokens=1,* delims=="%%a in (' WMIC CPU get Name^,extclock^,cpustatus^,description/value ') Do(Set/A Tee+=1if"!tee!" = = "3"EchoNumber of CPUs =%%bif"!tee!" = = "4"EchoProcessor Version =%%bif"!tee!" = = "5"EchoFSB =%%bif"!tee!" = = "6"EchoName and Main frequency =%%b)SetTee=0Echo.EchoDisplay: for/F "tokens=1,* delims=="%%a in (' wmic desktopmonitor get Name^,screenwidth^,screenheight^,pnpdeviceid/value ') Do(Set/A Tee+=1if"!tee!" = = "3"EchoType =%%bif"!tee!" = = "4"EchoAdditional information =%%bif"!tee!" = = "5"EchoScreen height =%%bif"!tee!" = = "6"EchoScreen width =%%b)SetTee=0Echo.EchoHDD: for/F "tokens=1,* delims=="%%a in (' wmic diskdrive get Model^,interfacetype^,size^,totalsectors^,partitions/value ') Do(Set/A Tee+=1if"!tee!" = = "3"EchoInterface type =%%bif"!tee!" = = "4"EchoHDD model =%%bif"!tee!" = = "5"EchoNumber of partitions =%%bif"!tee!" = = "6"EchoCapacity =%%bif"!tee!" = = "7"EchoTotal Sector =%%b)Echopartition information: WMIC LogicalDisk where mediatype= ' Description,deviceid,filesystem,size ' Get,FreeSpaceSetTee=0Echo.EchoNetwork card: for/F "tokens=1,* delims=="%%a in (' WMIC nicconfig where ' index= ' 1 ' "Get Ipaddress^,macaddress^,description/value ') Do(Set/A Tee+=1if"!tee!" = = "3"EchoNetwork card type =%%bif"!tee!" = = "4"EchoNic IP =%%bif"!tee!" = = "5"EchoNic Mac =%%b)SetTee=0Echo.EchoPrinter: for/F "tokens=1,* delims=="%%a in (' wmic PRINTER get Caption/value ') Do(Set/A Tee+=1if"!tee!" = = "3"EchoPrinter name =%%b)SetTee=0Echo.Echosound card: for/F "tokens=1,* delims=="%%a in (' wmic sounddev get Name^,deviceid/value ') Do(Set/A Tee+=1if"!tee!" = = "3"EchoAdditional information =%%bif"!tee!" = = "4"EchoModel =%%b)SetTee=0Echo.EchoMemory: for/F "tokens=1,* delims=="%%a in (' systeminfo^|Find"Memory" ') Do(Echo%%a 4534%%b)Echo.Echovideo card:del/F "%temp%\temp.txt" 2>Nuldxdiag/t%temp%\temp.txt: Graphics cardREMit takes about 30 seconds!if EXIST"%temp%\temp.txt" ( for/F "tokens=1,2,* delims=:"%%a in (' findstr/c: "Card name:"/C: "Display Memory:"/C: "Current Mode:" "%temp%\temp.txt" ') Do(Set/A Tee+=1if!tee! = = 1Echographics card model:%%bif!tee! = = 2EchoMemory Size:%%bif!tee! = = 3Echocurrent setting:%%b) )Else(Ping/N 2 127.1>nulGotovideo card)Set/p var= need additional information (y/n): if/I%var% = = y Notepad "%temp%\temp.txt"del/F "%temp%\temp.txt" 2>nulPause

The results are as follows:

Source: http://www.jb51.net/bat/59059.html

Detects hardware batch commands, detects hardware bat, and obtains computer hardware information with one click

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.