zappbrannigan
Posts: 16
Joined: Tue Jan 21, 2020 5:15 pm

make iis setup and optional feature

Hi I'm having a hard time finding out how to make some of the AI modules to be an optional feature for the end user.
I can make a dialog and add a checkbox but I don't think this gets me what I am after. I have an IIS Website and app pool setup but I only want it to be attempted to be installed if the user checks it.

If someone can point me to the best practice guide on how to achieve this that would be great.
I was hoping that each module in AI would be more easily made a user option, but i'm newb so maybe just missing something.

Thanks!
Zapp
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: make iis setup and optional feature

Hello Zapp,

Indeed, as you have mentioned, in order to conditionally install a feature bundle you can make use of a CheckBox control.

Let's consider you have the following checkbox on one of your dialogs:
checkbox.png
checkbox.png (121.29 KiB) Viewed 2532 times
As you can see, the control has a property assigned to it and a default value. A checkbox control can have the following two states:

- checked ==> the property's value = the default value, e.g.:

Code: Select all

CHECKBOX_1_PROP = "CheckBox"
- unchecked ==> the property's value = empty string, e.g.:

Code: Select all

CHECKBOX_1_PROP = ""
In our case, we want to install a feature if the checkbox is checked by the user, therefore we can use a condition as it follows:
condition.png
condition.png (33.37 KiB) Viewed 2532 times
This way, the feature will be installed only if the user has checked the checkbox.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
zappbrannigan
Posts: 16
Joined: Tue Jan 21, 2020 5:15 pm

Re: make iis setup and optional feature

Hi Caitlin,
Thanks for the ideas here. I should have been more specific I think.
I have setup IIS default website and app pool in AI latest version.
I don't see how in your method to make the default web and associated app pool checkboxed windows features. Unless I'm missing something your suggestion is more related to having IIS features in windows installed.
My AI install happily installs the default web and app pool however, AI will error if no AI is installed.
If you could direct me how to ignore my IIS default and app pool if no IIS is detected on the machine, or alternatively make the checkbox work for my AI - IIS setup that would be great thanks!
(it may be I was supposed to do more than just specify a default web and app pool to define these as an AI feature?)

Cheers,
Zapp
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: make iis setup and optional feature

Hello Zapp,

Thank you for your followup on this.

It looks I may have misunderstood your scenario at first.
If you could direct me how to ignore my IIS default and app pool if no IIS is detected on the machine, or alternatively make the checkbox work for my AI - IIS setup that would be great thanks!
So, if I understand correctly, you want to install your Web Site and App Pool only if IIS is already installed on the machine?

If that is the case, you could try to create a Search or a Custom Action that does the check and then condition the installation of your website using the "IIS" page --> your website --> "Install Condition" field.

The same condition can then be used for your App Pool.

Hope this helps.

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

Return to “Common Problems”