kettch
Posts: 28
Joined: Wed Dec 03, 2008 9:34 pm

IIS And Features

I have an installer with two features, a webapp and some small thick client apps that plug into it (named "IIS" and "Components", respectively).

The problem is that even if the webapp feature is disabled from the feature tree the IIS configuration that copies and configures the website is triggered. If the feature is deselected in this way, it should skip copying the site and not try to configure IIS. The problem is that the installer still tries to copy/configure it and screws up (overwrites configs or if IIS doesn't exist it throws an error and rolls back, for example) if it is deselected.

In the IIS tools screen I've tried every combination of install conditions related to the IIS feature to determine whether to execute or not, to no avail. I'm on v6.7 of AI...does anyone have an idea on what's going on or a possible solution? Any help would be appreciated as this is quite frustrating.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: IIS And Features

Hi,

You can make sure that the IIS elements are not installed by conditioning them with the feature action (what the installer will do with the feature) of the IIS feature. For example, if the Identifier of the feature is "IIS", the condition would look like this:

Code: Select all

&IIS = 3
Let me know if the problem persists even when using an appropriate condition.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kettch
Posts: 28
Joined: Wed Dec 03, 2008 9:34 pm

Re: IIS And Features

&IIS = 3 is what it is set to, and I've tried quite a few varieties of the condition and no matter what the installer runs the IIS config feature. It makes no sense why the condition doesn't seem to be met.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: IIS And Features

Hi,

Perhaps the IIS action still runs somehow. Please try this:
- open the AIP file with a text editor
- find the "caphyon.advinst.msicomp.MsiInstExSeqComponent" component
- find the "AI_IIsInstall" action
- modify its condition attribute to include this:

Code: Select all

AND &IIS = 3
- do the same for the "AI_IIsUninstall" action
- save and close the AIP file
- rebuild the project

The final entries in the AIP should look something like this:

Code: Select all

<ROW Action="AI_IIsInstall" Condition="(VersionNT >= 500) AND (NOT Installed) AND &IIS = 3" Sequence="6509"/>
<ROW Action="AI_IIsUninstall" Condition="(VersionNT >= 500) AND (REMOVE="ALL") AND &IIS = 3" Sequence="1699"/>
Let me know if the problem persists even when using this approach.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kettch
Posts: 28
Joined: Wed Dec 03, 2008 9:34 pm

Re: IIS And Features

That approach appears to have worked! Thanks! :D
Uria
Posts: 21
Joined: Tue Mar 03, 2009 8:47 am

Re: IIS And Features

Hello,

I'm experiencing a similar issue. I have a virtual directory to set up for the first feature and a Windows Service for the second feature.
Your suggestion seems to work when I run the installation and select only the first feature.
However, when I run the MSI for the second time, select the 'Modify' option, remove the first feature, and add the second feature, the removal of the virtual directory is not performed. The source files are removed correctly.

Can you suggest any solution?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: IIS And Features

Hi,

Supposing the virtual directory feature uses the identifier "IIS", you can try using these conditions for the IIS actions:

Code: Select all

<ROW Action="AI_IIsInstall" Condition="(VersionNT >= 500) AND &IIS = 3" Sequence="6509"/>
<ROW Action="AI_IIsUninstall" Condition="(VersionNT >= 500) AND &IIS = 2" Sequence="1699"/>
"&IIS" will be resolved to "&IIS" which represents the feature action (3 means that the feature is installed and 2 means that the feature is uninstalled).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Uria
Posts: 21
Joined: Tue Mar 03, 2009 8:47 am

Re: IIS And Features

This solves the problem... not intuitive to the user though.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: IIS And Features

Hi,

Currently the IIS elements cannot be conditioned (this is why the AIP needs to be edited manually). However, a more user-friendly approach will be available in a future version.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”