ahmetildirim
Posts: 2
Joined: Fri Feb 16, 2018 9:01 am

Prevent removing website on major upgrade

Hi,
We are evaluating Advanced Installer upgrade options. Our product consists of two website hosted by IIS. When we try to install a major upgrade, AI removes old version. Removing an old version also removes websites on IIS. We need a way to prevent removing websites. Because removing websites also removes custom modification made by user, such as bindings and ssls.
Is there a condition to prevent uninstalling websites
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Prevent removing website on major upgrade

Hello,

Unfortunately, currently we don't have support to preserve web site settings during upgrade. We have such an improvement on our TODO list and hopefully it will be available soon. We will notify you on this thread when such option will be available.

Until then, please take a look the solution posted here by my colleague Bogdan: Reinstalling dropping IIS settings

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Carlostwin
Posts: 5
Joined: Tue Feb 28, 2017 3:17 pm

Re: Prevent removing website on major upgrade

This is driving me crazy. We have an installer that installs a website, creates a sql database and some files. All works fine.

We added the ability to upgrade, mostly works fine.~

Two problems on upgrade:-

- The original install folder is removed, losing it's original permissions or any changes.
- The app pool and websites are removed and re-installed (losing and changes made by the user).

I've tried setting InstallExecuteSequence > AI_IIsUninstall to:-

- (VersionNT >= 500) AND (REMOVE = "ALL") AND (NOT UPGRADINGPRODUCTCODE)
- (VersionNT >= 500) AND (REMOVE = "ALL") and (NOT UPGRADINGPRODUCTCODE) and (NOT OLDPRODUCTS)
- 1=2

Nothing I do stops the website, app pool and folder being removed.

I'm using V14.7.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Prevent removing website on major upgrade

Hi,

Please keep in mind that this is the normal behavior when a major upgrade is performed. The old version with all resources and configurations is removed and the new version is installed.

If you want to preserve the website configurations, you can use the solution described in the thread my colleague mentioned above. In order to preserve some files and folders too, you can proceed as described in the "Avoid file removal during upgrade" thread.

However, it is not recommended to preserve the whole application folder just to keep its permissions. In order to set permissions on a folder, you can configure them in the "Permissions" tab when you go to its properties.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Carlostwin
Posts: 5
Joined: Tue Feb 28, 2017 3:17 pm

Re: Prevent removing website on major upgrade

Hello Eusebiu,

thank for coming back to me, but I think there is a misunderstanding. I'm happy to delete all contents of the parent folder just not the folder itself. This is because it's highly likely that permissions on this folder may be customised.

Also, you made no mention of the removal of the IIS site and app pool problem.

Turning it on it's head, all I want the upgrade to do, is replace some files (but keep the folder) and run some SQL update / insert scripts.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Prevent removing website on major upgrade

Hi,
thank for coming back to me, but I think there is a misunderstanding. I'm happy to delete all contents of the parent folder just not the folder itself. This is because it's highly likely that permissions on this folder may be customised.
In order to keep only the folder, but delete its content, you can select the "Create folder on target machine" option from its properties, then go to its component and set the "Permanent" flag for it. In this case the folder itself will never be deleted from the machine.

If you want to remove it on a full uninstall, you can go to its "Operations" tab, check the "Remove folder" option on "Component uninstall" and use this condition for it: NOT OLDPRODUCTS
Also, you made no mention of the removal of the IIS site and app pool problem
I mentioned that if you want to preserve the website configurations (including App Pools) during the upgrade, you can implement the solution from the "Reinstalling dropping IIS settings" thread.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Prevent removing website on major upgrade

Hello,

This improvement has been added in version 16.5 of Advanced Installer, released on November 13th, 2019.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”