Add Remove Logic
Posted: Wed Dec 17, 2008 8:41 am
I have some config files that my setup needs to create on the initial install only. To accomplish this I added some registry values to retain the previous installed state of each feature, allowing me to skip the creation of the config files for an add/remove action even though the selected component state is TRUE. However, in doing so, I noticed that if I don't add the Windows Installer actions during an add/remove --EVEN FOR ALREADY INSTALLED FILES-- then Windows Installer identifies this as an uninstall for that feature and removes the files.
This led me to wonder if, during an add/remove, files get re-installed even if they are already there. To test this, I used my instance of Install Aware 8. I went through add/remove programs to enter the maintenance mode of the IA8 install. I selected the radio button for add/remove but I didn't change a thing in the component tree. To my surprise, setup went through what appeared to be a re-install of the complete package. I even had to rerun my license .exe after this process. To me, this seems more like a repair action.
I'm hoping that Windows Installer checks versions and doesn't overwrite a currently installed and running Windows Service. I expected the component selections to be remembered between add/remove actions such that adding a single component would truly only add the newly selected component files.
Can someone help me understand what I am experiencing? It looks like we need to put non-Windows Installer actions in a separate conditional section and trust that the Windows Installer will not overwrite files that do not need to be overwritten?
This led me to wonder if, during an add/remove, files get re-installed even if they are already there. To test this, I used my instance of Install Aware 8. I went through add/remove programs to enter the maintenance mode of the IA8 install. I selected the radio button for add/remove but I didn't change a thing in the component tree. To my surprise, setup went through what appeared to be a re-install of the complete package. I even had to rerun my license .exe after this process. To me, this seems more like a repair action.
I'm hoping that Windows Installer checks versions and doesn't overwrite a currently installed and running Windows Service. I expected the component selections to be remembered between add/remove actions such that adding a single component would truly only add the newly selected component files.
Can someone help me understand what I am experiencing? It looks like we need to put non-Windows Installer actions in a separate conditional section and trust that the Windows Installer will not overwrite files that do not need to be overwritten?