jmace
Posts: 55
Joined: Thu Jul 01, 2010 4:46 pm

Reinstalling dropping IIS settings

I am working on testing an update that I have a slight issue.

If the application was purposely installed in the installer created a website or virtual directory in the user runs the new installer the website or virtual directory is dropped. I have the new installer setup where if the application was previously installed all of the intermediate dialogues are skipped. The new installer uninstalls the previous version automatically and installs a new version. If I manually set up IIS, however, my virtual directory or website remains intact and runs as expected with the new updated version.

My assumption is that if AI sets up IIS, then it is uninstalled, all of my IIS settings are dropped. My question is, is there a way that I can have AI not drop all of my IIS settings on the uninstall?
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Reinstalling dropping IIS settings

Hi,

From what I understood you have an old version of your application which installs a web site/virtual directory and then you come with a new version of your application. The new version should skip the IIS installation if the web site/virtual directory already exists on the machine, which you would expect to, as it was installed by the old version.

If my assumption is correct then you should know this is the normal behavior of a setup package, i.e. to remove on uninstall/upgrade all the settings made on install.

To skip the uninstall of the web site/virtual directory from the old version you need follow these steps:
-- go to Table Editor page and locate the table InstallExecuteSequence
-- in this table you will find the custom action AI_IIsUninstall
-- the default condition of this custom action is (VersionNT >= 500) AND (REMOVE="ALL")
-- edit it and set it to (VersionNT >= 500) AND (REMOVE="ALL") AND (NOT UPGRADINGPRODUCTCODE)

This new condition will make the uninstall of your web site/virtual directory to not occur during an upgrade operation.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jmace
Posts: 55
Joined: Thu Jul 01, 2010 4:46 pm

Re: Reinstalling dropping IIS settings

Thanks.

How would I go about telling AI not to delete my Registry keys?

Jim
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Reinstalling dropping IIS settings

Hi Jim,

Since you are talking about an upgrade, you can use our Persistent User Data wizard from the Wizards -> Resources in the menu bar. This wizard will allow you to specify which files and registry entries will be preserved in an upgrade or repair operation.

Also, here is an article that applies to registry entries as well to help you with this. For a manual approach you can also follow the "Preserve registry key at install" article.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jmace
Posts: 55
Joined: Thu Jul 01, 2010 4:46 pm

Re: Reinstalling dropping IIS settings

I am doing a uninstall/reinstall as stated above. I'm able to preserve my registry keys. Thanks.

My problem now is that if I do a uninstall/reinstall, automatically, everything runs except at the very end it rolls back the installation and I can't figure out why.

If I just do a straight install, it installs fine. If I do a Repair, all of the files are installed and registry values that are available are written and the application runs successfully. If I do a Modify, the application is modified correctly and runs successfully.

To recap:
Clean install = SUCCESS
Automatic uninstall previous version and install of new version = FAILURE (MSI rolls back)
Repair = SUCCESS
Modify = SUCCESS
Remove = SUCCESS

SUCCESS = The installer installs the database and the web application runs successfully.
FAILURE = The installer uninstalls the old version successfully but after the SQL scripts are successfully ran, a couple other tasks flicker by, then the MSI rolls back the installation.

Attached is the log files and project file.
Attachments
Tracker-3.0.3-Uninstall-Reinstall.log
Uninstall/Reinstall
(762.45 KiB) Downloaded 553 times
Tracker-3.0.3.log
Clean Install
(514.4 KiB) Downloaded 609 times
Tracker-3.0.3.2.aip
Tracker-3.0.3.aip Project File
(111.11 KiB) Downloaded 623 times
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Reinstalling dropping IIS settings

Hi,

I see you have changed the default order of upgrade, in Upgrades page, this could affect with other custom behavior from your package.
Can you please try using the default upgrade order?

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jmace
Posts: 55
Joined: Thu Jul 01, 2010 4:46 pm

Re: Reinstalling dropping IIS settings

Thanks for all your help. I think I'm on my way. I made those changes that you suggested for my application to not uninstall the web application under IIS, but I'm still having the same problem with the Windows Installer dropping the virtual directory. Attached are my files:
Attachments
Tracker-3.0.3.log
(761.09 KiB) Downloaded 550 times
Tracker-3.0.3.2.aip
(111 KiB) Downloaded 948 times
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Reinstalling dropping IIS settings

Hi,

This happens because you have correctly appleid the settings I said only in the last version of your product.

Please note that the same changes from Table Editor page need to be applied also for the old version. The install of the new package will automatically
trigger the uninstall of the old one, so the action "AI_IIsUninstall" from the old one will be called.

If you set the condition I said in the old package the action "AI_IIsUninstall" will not be executed because the condition will be false, i.e. an upgrade is in progress.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jmace
Posts: 55
Joined: Thu Jul 01, 2010 4:46 pm

Re: Reinstalling dropping IIS settings

OK, gotcha. Thanks. There's not much I can do about it now since that old version has been rolled out and met the end of its lifecycle. I guess I will revisit this with the next upgrade.

Return to “Common Problems”