Archive: Removing selected components


Removing selected components
I have an install that prompts the operator to select which components to install. When re-running the install, I want to be able to detect if the user unselects a component and then uninstall that component. Has anyone done this? Are there any "go bys" for this case? Thanks, David


What do you meen by "re-running"? Are you going back to the components page using the 'back' button or you executing the installer again?


Check for the installed components (IfFileExists, or read some setting from the registry) in .onInit. Then enable those components with setsectionflags, and set some variables to remember them.

Then simply create a hidden section that deletes all components that were pre-installed but got unchecked.


Sorry for not being clear about re-running the install. What I want to be able to do is to re-execute the install program and allow them to check new components (which is working) and also to deselect previously selected components and have them uninstalled. Hope this is clearer.