请教vfp如何获取电脑的唯一标识
请教vfp如何获取电脑的唯一标识
[解决办法]
LOCAL oWMI AS OBJECT,oLocal AS OBJECT,oHARDWARE AS OBJECT,object1 AS OBJECT,lcCPUID,LcMAC,lcHDID,lcSerialoWMI=CREATEOBJECT("WbemScripting.SWbemLocator")oLocal=oWMI.ConnectServer(".", "root\cimv2")oHARDWARE=oLocal.ExecQuery("SELECT * FROM Win32_Processor")FOR EACH object1 IN oHARDWARE lcCPUID=object1.Properties_('ProcessorId').VALUE EXITENDFORoHARDWARE=oLocal.ExecQuery("SELECT * FROM Win32_PhysicalMedia")FOR EACH object1 IN oHARDWARE lcHDID=object1.Properties_('SerialNumber').VALUE EXITENDFORoHARDWARE=oLocal.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration Where IPEnabled=1")FOR EACH object1 IN oHARDWARE LcMAC=object1.Properties_('MACAddress').VALUE LcIP=object1.Properties_('IPAddress').VALUE EXITENDFOR?'CPU序号:',lcCPUID?'硬盘序号:',lcHDID?'网卡MAC地址:',LcMAC?'IP地址:',LcIPRELEASE oWMI