Inno setup Inno:将用户和串行数据写入注册表
在inno安装过程中,我试图将用户名和序列号写入注册表,在编译过程中出现以下错误:Inno setup Inno:将用户和串行数据写入注册表,inno-setup,Inno Setup,在inno安装过程中,我试图将用户名和序列号写入注册表,在编译过程中出现以下错误: Invalid prototype for 'RegisteredUser' 来自Inno的区块 [Code] function RegisteredUser(): String; begin Result := 'test'; end; [Registry] Root: HKLM; Subkey: "SOFTWARE\Platform\Brand"; ValueType: string; ValueN
Invalid prototype for 'RegisteredUser'
来自Inno的区块
[Code]
function RegisteredUser(): String;
begin
Result := 'test';
end;
[Registry]
Root: HKLM; Subkey: "SOFTWARE\Platform\Brand"; ValueType: string; ValueName: "RegisteredUser"; ValueData: {code:RegisteredUser};
有什么想法吗
或者,如果我可以直接在[Code]中创建注册表,也可以使用它
感谢显然,在inno设置中,
{code:block}
调用的函数必须是单字符串参数函数(即使您不使用它)
function RegisteredUser(Param: String): string;
begin
Result := SerialPage.Values[0];
end;
是的,从非[Code]区域调用的函数必须有一个字符串参数。这给了它们很大的灵活性,可以执行以下操作:
[Files]Source:“B\MYFILE.TXT”;DestDir:“{app}”;Check:DirExists(ExpandConstant('{app}\SubDir'))
检查“Check parameters”用于完整讨论的Inno设置帮助索引中的条目。