问题
I would like to extract the IMEI number/Device ID from the computer using excel.
In CMD I can do it in this way: :netsh mbn sh interface" and from the list given I take the Device ID.
I was tryong to find something online but no luck so far, that's why I'm asking your help, maybe some of you knows where to search or how to start.
How can I do this with excel vba?
回答1:
You can use the following and then use split function to extract what you need
Option Explicit
Public Sub TEST()
Debug.Print CreateObject("wscript.shell").exec("cmd /V /C netsh mbn show interface").StdOut.ReadAll
End Sub
回答2:
Yes, Thank you. I only had time to try it out today. Thank you once more.
来源:https://stackoverflow.com/questions/54709575/device-id-with-excel-vba