2020-1-17windows下获取硬盘序列号
===================================
winkey run cmd
Microsoft Windows [版本 10.0.18363.592]
(c) 2019 Microsoft Corporation。保留所有权利。
方法1:
C:\Users\Administrator>wmic diskdrive get serialnumber
SerialNumber
W3PC29KQ
方法2:
C:\Users\Administrator>wmic path win32_physicalmedia get SerialNumber
SerialNumber
W3PC29KQ
方法3:
C:\Users\Administrator>wmic path win32_physicalmedia get SerialNumber
SerialNumber
W3PC29KQ
获取硬盘的更多信息
wmic diskdrive get Name, Manufacturer, Model, InterfaceType, MediaType, SerialNumber
C:\Users\Administrator>wmic diskdrive get Name, Manufacturer, Model, InterfaceType, MediaType, SerialNumber
InterfaceType Manufacturer MediaType Model Name SerialNumber
IDE (标准磁盘驱动器) Fixed hard disk media ST500LT012-1DG142 \\.\PHYSICALDRIVE0 W3PC29KQ
C:\Users\Administrator>
注:
1、windows 7 下获取的序列号格式可能和 Windows 10 下的不一样;
2、相关的字段(属性)可以查看微软官方文档;
https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-diskdrive