标题:WIN7 64位支不支持WMI
只看楼主
w327555162
Rank: 2
等 级:论坛游民
帖 子:45
专家分:43
注 册:2011-1-4
结帖率:85.71%
 问题点数:0 回复次数:0 
WIN7 64位支不支持WMI
Dim MyMac
Dim k
    Set MyMac = GetObject("Winmgmts:").InstancesOf("Win32_NetworkAdapterConfiguration")
  For Each MO In MyMac
If MO.IPEnabled = True Then
     k = MO.MACAddress
    Exit For
    End If
    Next
     k = Mid(k, 1, 2) & Mid(k, 4, 2) & Mid(k, 7, 2) & Mid(k, 10, 2) & Mid(k, 13, 2) & Mid(k, 16, 2)
這段代碼在XP下沒問題,在WIN7 64位的系統下,不報錯,K值返回空
2011-12-06 14:43



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




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

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