根据用户输入更改 AppID 和 AppName
我想在同一系统上多次安装同一应用程序,例如两个用户使用两个不同的 Web 服务(每个都有自己的)。
在我的设置脚本中,我想根据用户的输入更改
AppID
和AppName
(例如我的默认AppName="Service App"如果用户输入了“One”,
应更改为AppName="Service App One"
。以上更改应反映在“选择开始菜单文件夹”页面中。
如何捕获“选择开始菜单文件夹”和“选择目标位置”向导页面的下一步单击事件?这是验证用户输入所必需的。
I want to install the same application multiple times on the same system, for example for two user using two different web services (each one has their own).
In in my setup script I want to change the
AppID
andAppName
based on input from the user (for example my defaultAppName="Service App"
should be changed toAppName="Service App One"
if the user has entered "One").Above changes should be reflected in the "Select Start Menu Folder" page.
How can the Next click events for the "Select Start Menu Folder" and the "Select Destination Location" wizard pages be caught? This is required to validate the user input.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
AppID
可以包含{code...}
常量(请参阅 Inno Setup 文档),因此您可以自由添加自定义向导页面来输入附加字符串这是AppID
的一部分。我认为对AppName
执行此操作没有意义,因为根据文档,它仅用于向导中的显示目的。您应该在“选择目标位置”页面之前插入自定义输入页面,并尝试对
DefaultDirName
使用{code...}
常量,使用 您应该在“选择目标位置”页面之前请参阅用于添加向导页面和
NextButtonClick
处理程序的CodeDlg.iss
示例脚本。AppID
can include{code...}
constants (see the Inno Setup documentation), so you are free to add a custom wizard page to enter the additional string that is part of theAppID
. I don't think it makes sense to do this forAppName
, as according to the documentation it is used for display purposes in the wizard only.You should insert your custom input page before the "Select Destination Location" page and try to use a
{code...}
constant forDefaultDirName
too, using the value the user entered before.See the
CodeDlg.iss
sample script for adding wizard pages and theNextButtonClick
handler.这不是你问题的完整答案,但我想无论如何我都会展示它。如果您喜欢脚本,您可以将其作为起点。
在我的脚本中,我希望版权年份 (AppCopyright) 反映当前年份(构建脚本时)。
我使用以下代码:
注意 {code:FunctionName}
在脚本末尾的 [code] 部分中,我有以下例程:
正如我所说,这不是一个完整的答案。但我一年可能会使用 InnoSetup 1、2 周,所以我无法再帮助你了。无论如何,希望它能有所帮助。
It's not a conplete answer to your question, but I thought I'd show it anyway. If you are into scripts you can maybe take it as a starting point.
In my scripts I want the copyright year (AppCopyright) to reflect the current year (when the script is build).
I use the following code:
Notice the {code:FunctionName}
In the [code] section at the end of the script I have the following routine:
As I said, it's not a complete answer. But I use InnoSetup maybe 1, 2 weeks a year, so I can't help you any more. Hope it helps, anyway.
您好,感谢您在经过一番努力后回复我,我找到了自己问题的答案,然后意识到我可能没有正确地提出问题。
所需的输出是在开始菜单下有两个单独安装的应用程序及其自己的卸载程序,并且认为更改 Appid 和 Appname 就可以解决问题。
这是我
在上面所做的两个必需的编辑,这可以在自定义页面中使用以下
WizardGroupValue 用于读取“选择开始菜单”的值
以访问内置向导中的下一个事件我使用了以下内容
Hi thanks for replying after some struggle I found answers to my own question and then realised maybe I was not asking the question correctly.
The output required was having two separate installed application with their own uninstaller under the start menu and thought Changing Appid and Appname will do the trick.
Here's what I did
above two required editing which was possible in the custom pages using following
WizardGroupValue is used for reading values of "Select Start Menu"
for accessing the next event on in built wizard I used the following