Installation rollback when "Default Web Site" is missing - Advanced Installer Community
Zsolt Kollarits
Posts: 409
Joined: Fri May 29, 2015 10:36 am

Installation rollback when "Default Web Site" is missing

Dear Advanced Installer Support Team,

One of our customers reported a problem: if they try to install our product on a PC where "Default Web Site" is missing from IIS, then our installer is not able to create our web application. Please take a look at the attached screenshot.

Our question is: how could we just show a warning dialog for the users about the problem and avoid the rollback. The installer should just skip the installation of our web feature, and show a warning. The rest of our features could still be installed. Is that possible somehow?

Best regards,
Zsolt
Attachments
ForAI.png
ForAI.png (9.98 KiB) Viewed 4256 times
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Installation rollback when "Default Web Site" is missing

Hello Zsolt,

I believe that in this case it would be nice to first check if the "Default Web Site" is present on the machine and if so, proceed with the installation of your web applications, otherwise skip them.

For this, you can make use of the "Install Condition" field from your web application:
webApp.png
webApp.png (55.96 KiB) Viewed 4227 times

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 409
Joined: Fri May 29, 2015 10:36 am

Re: Installation rollback when "Default Web Site" is missing

Hi Catalin,

Could you please propose us a proper install condition to check whether "Default Web Site" is present or not? We also had the idea that we should check the existence of it, but we would need to use some in-build Advanced Installer condition for it. Also if "Default Web Site" is not there, we would like Advanced Installer to show a dialog or a notification for our users.

Best regards,
Zsolt
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Installation rollback when "Default Web Site" is missing

Hello Zsolt,

We do indeed make our own search in what regards the "Default Web Site", but unfortunately we do not save the result anywhere (in a property), therefore I'm afraid we cannot use this as a condition.

In this scenario, we will have to go with a custom approach.

In our custom action, here is what we are looking for when searching for the default website:

- a site with the "Default Web Site" name

- a site with ID equal to "1"

based on this, you can create your own custom action that will do the search and will spawn a message box to let the user know, in the case where the default web site is not present on the machine.

Few important things here:

- the custom action must be executed as an immediate custom action

- the custom action should be run elevated (if you have the "Run as admin" option from "Install Parameters" page, you can ignore this point)

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 409
Joined: Fri May 29, 2015 10:36 am

Re: Installation rollback when "Default Web Site" is missing

Dear Catalin,

Thank you for your hints, they are really useful. We will try that out.

Best regards,
Zsolt
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Installation rollback when "Default Web Site" is missing

You are always welcome, Zsolt!

My pleasure to help.

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

Return to “Common Problems”