标题:获取机器码并注册那位朋友帮个忙给改改先谢谢了!!!
取消只看楼主
tjnhxglhj
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2013-7-19
结帖率:0
已结贴  问题点数:20 回复次数:1 
获取机器码并注册那位朋友帮个忙给改改先谢谢了!!!
    MsgValue = ""
    Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
    获取硬盘序列号
    Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_PhysicalMedia", , 48)
    For Each objItem In colItems
    MsgValue = MsgValue & vbCrLf & "硬盘 = " & objItem.SerialNumber
    Next
    '获取主板序列号
    Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard", , 48)
    For Each objItem In colItems
    MsgValue = MsgValue & vbCrLf & "主板=" & objItem.SerialNumber
    Next
    '获取CPU ID
    Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor", , 48)
    For Each objItem In colItems
    MsgValue = MsgValue & vbCrLf & "CPU = " & objItem.ProcessorId
    Next
    '获取BIOS序列号
    Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS", , 48)
    For Each objItem In colItems
    MsgValue = MsgValue & vbCrLf & "BIOS= " & objItem.SerialNumber
    Next
    '获取网卡MAC地址
    Set colItems = objWMIService.ExecQuery("SELECT MACAddress FROM Win32_NetworkAdapter WHERE ((MACAddress Is Not NULL) AND (Manufacturer <> 'Microsoft'))", , 48)
    For Each objItem In colItems
    MsgValue = MsgValue & vbCrLf & "网卡 = " & objItem.MACAddress
    Next
    Wscript.Echo MsgValue
搜索更多相关主题的帖子: 序列号 朋友 
2013-07-19 16:55
tjnhxglhj
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2013-7-19
得分:0 
回复 2楼 wxflw
怎么生成啊,现在硬件信息都得到了

2013-07-19 17:40



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-417640-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.448577 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved