首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > VFP >

请问vfp怎么获取电脑的唯一标识

2012-05-20 
请教vfp如何获取电脑的唯一标识请教vfp如何获取电脑的唯一标识[解决办法]SQL codeLOCAL oWMI AS OBJECT,oL

请教vfp如何获取电脑的唯一标识
请教vfp如何获取电脑的唯一标识

[解决办法]

SQL code
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 

热点排行