我正在尝试为我正在编写的 Excel(适用于 Windows)应用程序提供一些基本级别的保护。我正在考虑使用机器的 mac 地址生成许可证文件。我的问题是:如何使用 VBScript 获取 Mac 地址?
最佳答案
dim WMI: set WMI = GetObject("winmgmts:\\.\root\cimv2")
dim Nads: set Nads = WMI.ExecQuery("Select * from Win32_NetworkAdapter where physicaladapter=true")
dim nad
for each Nad in Nads
if not isnull(Nad.MACAddress) then Wscript.Echo Nad.description, Nad.MACAddress
next
Cisco Systems VPN Adapter for 64-bit Windows
我不会将其描述为物理的。
https://stackoverflow.com/questions/16486584/