0

I am trying to upgrade IIS websites by keeping old IIS setting as it is. I found same question but didn't find any satisfying answer.

SO after long research I found that "ConfigureIIs" action removing Old IIS websites, now I want to skip this action.

<Custom Action="ConfigureIIs" After="InstallFiles">(&amp;Web = 3)</Custom> This I have tried.

please provide solution.

sagar charde
  • 59
  • 1
  • 3
  • You might learn how to use PowerShell script to do so and then call PowerShell from MSI. I don't think WiX exposes all IIS related API for customization. – Lex Li Jul 21 '19 at 05:25
  • Windows Installer sets [`UPGRADINGPRODUCTCODE`](https://learn.microsoft.com/en-us/windows/win32/msi/upgradingproductcode) property when a product gets removed due to a major upgrade. – zett42 Jul 21 '19 at 09:01
  • For the record: `UPGRADINGPRODUCTCODE` is set in the old setup being uninstalled during a major upgrade (not in the newer version being installed), `WIX_UPGRADE_DETECTED` is set in a setup if it detects that an older version is being uninstalled / upgraded as part of a major upgrade process. [See this answer](https://stackoverflow.com/a/51090120/129130). – Stein Åsmul Jul 21 '19 at 14:55

1 Answers1

0

The WebSite element has a ConfigureIfExists attribute that I typically set to No. That's met my needs nicely. Would that work for you?

The way I use it is I install a site knowing it'll conflict with the default website and not start. Then I have the webmaster configure it with port / host headers / SSL certs per his specific needs and start the site. Future upgrades leave all of this intact.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100