One-click hardware configuration check and automatic upload to server

Source: Internet
Author: User
Tags echo display
@ Echo offcolor 0 atitle hardware viewer mode con Cols = 90 echo hardware viewing ..... SC config Winmgmt start = auto> NUL 2 <& 1net start Winmgmt 2> nulsetlocal enabledelayedexpansiondel/F "% Temp % \ temp.txt" 2> nuldxdiag/T % Temp % \ temp.txt del/F "Your computername.txt" 2> nulecho system information:> % computernamepolic.txt: systemrem this must 30sif exist "% Temp % \ temp.txt" (for/F "tokens = 1, 2, * delims =:" % A in ('f Indstr/C: "machine name:"/C: "processor:"/C: "system model:"/C: "memory:"/C: "Card Name: "/C:" Display memory: "/C:" Current Mode: "" % Temp % \ temp.txt "') Do (Set/a tee ++ = 1 if! Tee! = 1 echo computer name: % B >>% computername=.txt if! Tee! = 2 echo system model: % B >>% computername=.txt if! Tee! = 3 Echo CPU model: % B >>% computername=.txt if! Tee! = 4 echo Ram size: % B >>% computername=.txt if! Tee! = 5 echo. >>% computername=.txt if! Tee! = 5 echo displaycard: >>% computername=.txt if! Tee! = 5 echo display card: % B >>% computername=.txt if! Tee! = 6 echo displaymemory: % B >>% computername1_.txt) else (Ping/N 2 127.1> NUL goto System) set tee = 0echo.> % computername.txt echo mother board: >>% computername.txt for/F "tokens = 1, * delims =" % A in ('wmic baseboard get manufacturer ^, product ^, version ^, serialnumber/value') Do (Set/a TEE + = 1 if "! Tee! "=" 3 "Echo manufacturer: % B >>% computername=.txt if "! Tee! "=" 4 "Echo motherboard model: % B >>%computername=.txt) set tee = 0) set tee = 0 echo.> % computername1_.txt echo Hard Disk: >>% computername1_.txt for/F "tokens = 1, * delims =" % A in ('wmic diskdrive get model ^, interfacetype ^, size ^, totalsectors ^, partitions/value') Do (Set/a TEE + = 1if "! Tee! "=" 3 "Echo Interface Class: % B >>%computername=.txt if "! Tee! "=" 4 "Echo harddisk model: % B >>%computername=.txt if "! Tee! "=" 5 "Echo partionnum: % B >>%computername=.txt if "! Tee! "=" 6 "Echo Size: % B >>% computername=.txt) REM echo partion information: REM WMIC logicaldisk where mediatype = '12' get description, DeviceID, filesystem, size, freespace set tee = 0 echo.> % computername.txt echo netcard: >>% computername.txt for/F "tokens = 2 * delims =: "% A in ('ipconfig/All ^ | find/I" Description "') Do (Set Name = % A echo netcard model: % A >>% computername=.txt) for/F "tokens = 2 * delims =: "% A in ('ipconfig/All ^ | find/I" physical address "') Do (Set Name = % A echo MAC address: % A> % computername.txt) for/F "tokens = 2 * delims =:" % A in ('ipconfig/All ^ | find/I "Description "') do (Set Name = % A echo netcard model: % A> % computername1_.txt) for/F "tokens = 2 * delims =: "% A in ('ipconfig/All ^ | find/I" physical address "') Do (Set Name = % A echo MAC address: % A >>% computername.txt) Ver | find/I "Windows XP"> NUL 2> NUL & goto XP | goto win7: xpfor/F "tokens = 2 * delims =: "% A in ('ipconfig/All ^ | find/I" ip address "') Do (Set Name = % A echo IP Address: % A >>% computername=.txt): win7for/F "tokens = 2 * delims =: "% A in ('ipconfig/All ^ | find/I" IPv4 "') Do (Set Name = % A echo IP Address: % A >>%computername=.txt) echo view over! Net use \ 172.17.44.103 password/User: usercopy extends computername=.txt \ 192.168.1.1 \ hardfile $ pausestart extends computername=.txt

You only need to change the last 4-5 lines to your own file server information.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4A/17/wKioL1QiVn_gYENVAAI5teX0kFc457.jpg "Title =" 21.png" alt = "wkiol1qivn_gyenvaai5tex0kfc457.jpg"/>

This article from the "Fenglin late" blog, please be sure to keep this source http://fengwan.blog.51cto.com/508652/1557670

One-click hardware configuration check and automatic upload to server

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.