Inno Setup:如果选择了其他组件,则抑制警告

Inno Setup: Suppress warning if other component selected

[Components] 中,我定义了两个组件(比如 A 和 B)exclusive。事实上,这两个组件并不是真正的组件,而是用户必须选择的两个版本的应用程序配置。

假设用户安装了我的应用程序并选择了组件 A。如果用户这次选择组件 B 安装我的应用程序的更新,则会弹出一个警告框,上面写着

Setup has detected that the following components are already installed on your
....
Deselecting these components will not uninstall them.
Would you like to continue anyway?

有什么方法可以抑制此警告消息,因为在我的情况下它会让用户感到困惑(因为他知道组件 A 和 B 只是应用程序配置的不同版本)?

我是否滥用了向导组件 selection 页面?如果是,我还应该使用什么来允许用户为他的应用程序配置 select 版本 A 或 B?

首先,是的,您可能滥用了这些组件。设置类型不是更合适吗?


无论如何,您可以使用 disablenouninstallwarning flag:

Instructs Setup not to warn the user that this component will not be uninstalled after he/she deselected this component when it's already installed on his/her machine.

Depending on the complexity of your components, you can try to use the [InstallDelete] section and this flag to automatically 'uninstall' deselected components.