gpt4 book ai didi

inno-setup - 根据用户输入更改 AppVerName 和 DefaultGroupName

转载 作者:行者123 更新时间:2023-12-03 12:31:10 24 4
gpt4 key购买 nike

我希望我的安装程序询问用户应该如何在“添加\删除程序”中命名程序。我想为此添加自定义向导页面。自定义向导页面没有问题,但我不知道如何在显示向导后更改 AppVerName。我已经试过了:

[Setup]
AppVerName={code:GetUserAppName}
DefaultDirName={pf}\{code:GetUserAppName}
DefaultGroupName={code:GetUserAppName}

[Code]
var
AppUserName: String;

function GetUserAppName(param: String): String;
begin
Result := AppUserName;
end;

但是函数 GetUserAppName 被调用得太早,在我有任何机会向用户询问程序名称之前。并且在显示向导之后或安装之前不会调用此函数。

是否有可能从代码中更改 AppVerName,例如在 NextButtonClick 事件中?

附言已经有类似的问题: Changing AppID and AppName based on user input ,但接受的答案是完全错误的,因为他的作者问错了问题:

I found answers to my own question and then realised maybe I was not asking the question correctly.

最佳答案

UninstallDisplayName directive ,只有在实际安装期间您已经知道名称时才会解析。因此,您可以在此处使用 GetUserAppName:

[Setup]
UninstallDisplayName={code:GetUserAppName}

另见 Inno Setup Change AppName based on component(s) selected .

关于inno-setup - 根据用户输入更改 AppVerName 和 DefaultGroupName,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46328133/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com