I've a file the must be installed only if a specific component is also installed. But I also allow custom install. So there is the need to auto-check the component if a specific component is also checked (and vice versa, disable if the other component is not enabled). I know I can simply attach the file itself to the specific component, but I want to provide to user the feedback about this prerequisite being installed.
So, short version: how to auto check component 'A' based to check status of component 'B' ?
A simple implementation for checking B, if A is checked:
The code requires Inno Setup 6 for
WizardIsComponentSelected
andWizardSelectComponents
(for a version of the code without those functions, see the answer history)The above is based on Inno Setup ComponentsList OnClick event.