读取本机物理地址(win10系统)并比较,如果正确继续执行,不正确退出执行
如题:想把宏执行加上执行条件,读取本机物理地址(win10系统)并比较,如果正确继续执行,不正确退出执行。软件上的一段宏:
Sub main()
MyAppID = Shell("J:\abc.exe", 1)
AppActivate MyAppID
End Sub
谢谢!!
Dim obj1 As Object, oObjs As Object Dim sSql As String sSql = "SELECT * FROM Win32_NetworkAdapter WHERE ((MACAddress Is Not NULL) AND (Manufacturer <> 'Microsoft'))" Set oObjs = GetObject("winmgmts:").ExecQuery(sSql) For Each obj1 In oObjs EnumMACAddresses = EnumMACAddresses & obj1.MACAddress & "," & obj1.Description & vbCrLf Next obj1