function GetMacAddress()
{
var _locator = new ActiveXObject("WbemScripting.SWbemLocator");
var _service = _locator.ConnectServer(".");
var _sql="Select MACAddress from Win32_NetworkAdapterConfiguration WHERE IPEnabled='TRUE' ";
var _properties = _service.ExecQuery(_sql);
var _e = new Enumerator(_properties);
var _p = _e.item();
var _mac = _p.MACAddress;
return _mac;
}
本文介绍了一个使用VBA实现的函数,用于获取Windows系统中已启用IP的网络适配器的MAC地址。
4863

被折叠的 条评论
为什么被折叠?



