作者在 2021-05-13 16:23:41 发布以下内容
作者:Tiger5392
转载:https://bbs.bccn.net/thread-210804-1-1.html
oWMI=CREATEOBJECT("WbemScripting.SWbemLocator")
oLocal=oWMI.ConnectServer(".", "root\cimv2")
oHardware=oLocal.ExecQuery("SELECT * FROM Win32_PhysicalMedia")
FOR EACH object1 IN oHardware
lcHDID=object1.Properties_('SerialNumber').VALUE
EXIT
ENDFOR
?'硬盘序号:',lcHDID
RELEASE oWMI