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
RETURN