Inno setup 在Inno安装程序中获取MAC地址

Inno setup 在Inno安装程序中获取MAC地址,inno-setup,Inno Setup,我尝试使用下面的代码在Inno安装程序中获取mac地址,但出现了如下错误: 内部错误:ExtractTemporaryFile:找不到文件“ISID.dll” 我已经在应用程序文件夹中复制了ISID.dll,但仍然出现上述错误 如果我遗漏了什么,请告诉我……: 函数GetMacAddress(输出:字符串):整数; 外部的GetMACAddress@files:ISID.dll stdcall'; 函数GetMacAdd(输出:string):string; 变量 类名:String; Ret:

我尝试使用下面的代码在Inno安装程序中获取mac地址,但出现了如下错误:

内部错误:ExtractTemporaryFile:找不到文件“ISID.dll”

我已经在应用程序文件夹中复制了
ISID.dll
,但仍然出现上述错误

如果我遗漏了什么,请告诉我……:

函数GetMacAddress(输出:字符串):整数; 外部的GetMACAddress@files:ISID.dll stdcall'; 函数GetMacAdd(输出:string):string; 变量 类名:String; Ret:整数; 开始 SetLength(类名称,256); Ret:=GetMacAddress(PChar(ClassName)); 结果:=副本(类名,1,Ret); 结束;
下面是一个脚本,它在Windows上使用WMI获取所有MAC地址

[代码]
类型
TMacAddressEntry=记录
MacAddress:string;
结束;
TmacadDressList=TMacAddressEntry的数组;
函数GetMacAddressList(输出列表:TmacAddressList):整数;
变量
I:整数;
WQLQuery:字符串;
WbemLocator:变体;
WbemServices:变体;
WbemObject:变体;
WbemObjectSet:变量;
开始
结果:=0;
WbemLocator:=CreateOleObject('WbemScripting.SWbemLocator');
WbemServices:=WbemLocator.ConnectServer('localhost','root\cimv2');
WQLQuery:=“从Win32_NetworkAdapterConfiguration中选择*,其中IPEnabled=true”;
WbemObjectSet:=WbemServices.ExecQuery(WQLQuery);
如果不是VarisAll(WbemObjectSet)和(WbemObjectSet.Count>0),则
开始
结果:=WbemObjectSet.Count;
SetArrayLength(列表,WbemObjectSet.Count);
对于I:=0到WbemObjectSet.Count-1 do
开始
WbemObject:=WbemObjectSet.ItemIndex(I);
如果不是VarisAll(WbemObject),则
开始
列表[I].MacAddress:=WbemObject.MacAddress;
结束;
结束;
结束;
结束;

您必须将该库包含在安装程序包中。有人知道该库可以下载到哪里吗?请注意,这在Windows XP上不起作用。查看调用
getMacAddresssList
函数时应传递哪些参数??