I have built an installer which includes the setting up of an IIS website + application pool.
This is working well - the website is installed correctly during install and is uninstalled correctly during uninstall.
The problem is that during upgrade installs (for new versions) any customisation of the IIS settings (application pool identity, bindings and so on) are reset to the original values I have set in my installer. I know this is because the website is uninstalled then reinstalled during the upgrade.
So I added an option that gives the user the option (or not) to install/reset IIS config. This works- IIS config is only deployed with the option set. But for upgrades, if the option is not selected I just want the existing config to be left as it is. But now during upgrades it just uninstalls it leaving nothing in IIS.
I use a property to decide if IIS should be configured and this works correctly. I know what I am missing is controlling the uninstall process - I need to prevent the removal of my website in IIS based on a property and/or whether I'm doing an upgrade or not.
I just need some pointers on the best approach to this. I've hunted round the manual & forum but have not found what I want so any tips would be very welcomed.