How to use wmic: wmic Hardware information name get Attribute name, attribute name 2

Code example:

// java gets CPU codepublic static String getCpuId() throws IOException {Process process = Runtime.getRuntime().exec(new String[]{" wmic",="" "cpu",="" "get",="" "processorid"});process.getoutputstream().close();scanner="" sc="new" scanner(process.getinputstream());string="" property="sc.next();String" serial="sc.next();System.out.println("CPU" serial="" number:="" "+property="" +="" ":="" "="" +="" serial);return="">

  • Basic information

Serial number of computer: wmic csproduct Screen information: wmic desktopmonitor Name of operating system: wmic os get name

  • CPU Information

View computer CPU information: wmic cpu View cpu details: wmic cpu list brief Get cpu name: wmic cpu get Name Get cpu core number: wmic cpu get NumberOfCores Get cpuNumber of threads: wmic cpu get NumberOfLogicalProcessors Query cpu serial number: wmic cpu get processorid

  • Motherboard Information

Motherboard information: wmic baseboard Query the motherboard serial number: wmic baseboard get serialnumber BIOS information: wmic bios BIOS serial number: wmic bios get serialnumber

  • Disk Information

View disk drive information: wmic diskdrive View hard disk serial number: wmic diskdrive where index=0 get serialnumber View disk logical partition information: wmic logicaldisk [get caption] View disk volume information: wmicvolume View the remaining space of the disk [take C drive as an example]: fsutil volume diskfree c:

  • Memory Information

Memory chip information: wmic memorychip View physical memory: wmic memphysical list brief View logical memory: wmic memlogical list brief View cache memory: wmic memcache list brief View virtual memory: wmicpagefile list brief

  • Sound Card Information

Sound card info: wmic sounddev

  • NIC information

Network card information: wmic nic View network card: wmic nic list brief Network protocol information: wmic netprotocal

  • Other

Other methods for viewing hardware information under Windows [Command] systeminfo: Detailed configuration information of the computer and its operating system, including detailed information such as Windows system installation time patches, processor, memory, BISO, network card and IP address, etc., is also the most commonly used; sysdm.cpl: Open the system properties [select the computer with the mouse -> right click -> Properties] dxdiag: Open the DirectX diagnostic tool [can display graphics card information] start msinfo32: Open the systemInfo window devmgmt.msc : Open Device Manager taskmgr : Open Task Manager, or press Ctrl+Alt+Del) View physical memory and pagefile in performance tab winver check Windows version