- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我希望我的安装程序询问用户应该如何在“添加\删除程序”中命名程序。我想为此添加自定义向导页面。自定义向导页面没有问题,但我不知道如何在显示向导后更改 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/
我希望我的安装程序询问用户应该如何在“添加\删除程序”中命名程序。我想为此添加自定义向导页面。自定义向导页面没有问题,但我不知道如何在显示向导后更改 AppVerName。我已经试过了: [Setup
我是一名优秀的程序员,十分优秀!