问题
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