Inno Setup: Suppress warning if other component selected

ⅰ亾dé卋堺 提交于 2020-01-02 19:19:31

问题


In [Components] I have two components (say A and B) defined exclusive. In fact the two components are not really components but two versions of the application configuration the user must choose from.

Assume the user has installed my application with component A chosen. If the user installs an update of my application this time choosing component B a warning box pops up that says

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?

Is there any way to suppress this warning message since it is in my case rather confusing to the user (since he knows that component A and B are just different versions of the application configuration)?

Am I misusing the wizard component selection page? If yes what else should I use to allow the user to select version A or B for his application configuration?


回答1:


First, yes, you are possibly misusing the components. Would not a setup type be more appropriate?


Anyway, you can use the 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.



来源:https://stackoverflow.com/questions/37631304/inno-setup-suppress-warning-if-other-component-selected

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!