Enabling IIS before installation - Advanced Installer Community
fali
Posts: 22
Joined: Thu Mar 14, 2013 9:28 pm

Enabling IIS before installation

Hello,

I want to install a simple web app that gets hosted on the end user's IIS web server. I have gotten it to install on my machine just fine, but when I ran the installer on a coworker's machine the installer tripped an error stating "[ProductName] cannot be installed on machines that have an IIS version less than 5.0." He is running Windows 7 so I am sure he actually has IIS version 7.0, but he does not have it enabled which is why I think the error was tripped.

Does Advanced Installer have the capability to enable IIS before the installation?
fali
Posts: 22
Joined: Thu Mar 14, 2013 9:28 pm

Re: Enabling IIS before installation

Progress:

I added a property in the Install Parameters "INSTALL_WEB_APP" with value set to "false".

I added a Windows Features bundle in the Prerequisites and selected Internet Information Services. Set the install condition to [INSTALL_WEB_APP] = "true".

Set my web app's install condition to [INSTALL_WEB_APP] = "true" in the IIS page.

What I want to do is trigger that property to change from false to true with the click of a checkbox on one of my dialogs.
I set the property for the checkbox to [INSTALL_WEB_APP], default value to "false", and value to "true". It doesn't seem to be doing anything however, the INSTALL_WEB_APP property never seems to change and it never triggers install for IIS/my web app.

Am I taking the right route? What can I do to fix this issue?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Enabling IIS before installation

Hello,

Can you please make sure that the Update Features Install States predefined custom action is added before the ProgressDlg standard action from the Custom Actions page? You can see a standard action by using the "Show Standard Action" button on the Custom Actions page's toolbar or by using the option "Show Standard Action" from the context menu while an action group is selected.

If that didn't helped, please take a look on our Windows Features not working? fortum thread which may be useful.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
fali
Posts: 22
Joined: Thu Mar 14, 2013 9:28 pm

Re: Enabling IIS before installation

Hi Dan,

Thank you for your help. I actually got it working before I read your post, I used a different method. I set the default value of the checkbox's "Value" section to "true", and set the value of the "Value" section to the [INSTALL_WEBAPP] property. That seemed to work. However, I am having another issue: When I run my web app on some machines, I am running into a 404.3 error. I am not sure if you can help me with this, but I think it relates to the version of ASP.NET that the web app registers with. I developed the app in ASP.NET 2.0, so I set the target for the app in the "IIS" section to ASP.NET 2.0. However, this did not work for my colleague who is using .NET 4.0. He had to manually run the ASP.NET IIS Registration Tool, and then it worked. I then tried not specifying an ASP.NET version in the IIS section, but that didn't work either. Any help would be appreciated.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Enabling IIS before installation

Hello,
However, I am having another issue: When I run my web app on some machines, I am running into a 404.3 error. I am not sure if you can help me with this, but I think it relates to the version of ASP.NET that the web app registers with. I developed the app in ASP.NET 2.0, so I set the target for the app in the "IIS" section to ASP.NET 2.0. However, this did not work for my colleague who is using .NET 4.0. He had to manually run the ASP.NET IIS Registration Tool, and then it worked. I then tried not specifying an ASP.NET version in the IIS section, but that didn't work either. Any help would be appreciated.
This may happen if you are installing your setup against IIS 7 or newer versions. For IIS 7 or newer, the ASP.NET version to be used by your web application must be set in the configuration of the application pool to which it belongs. So, can you set the ".NET Framework version" combo box, from "Basic Pool Settings" section of your application pool, to "v2.0" and see if the behavior still persists?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
fali
Posts: 22
Joined: Thu Mar 14, 2013 9:28 pm

Re: Enabling IIS before installation

Hello Dan and Daniel,

I resolved the IIS version issue and for the most part, the installer is working well. However, I just discovered a new problem: if the user decides to de-select the "install web app" checkbox, and then clicks next (bringing them to the final dialog page before installation begins), and then they go back to the previous page, they can no longer check the "install web app" checkbox.

Dan: I was not able to find the Update Features Install States custom action, but to that note, I also did not see a Progress Dlg custom action.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Enabling IIS before installation

Hello,
I resolved the IIS version issue and for the most part, the installer is working well. However, I just discovered a new problem: if the user decides to de-select the "install web app" checkbox, and then clicks next (bringing them to the final dialog page before installation begins), and then they go back to the previous page, they can no longer check the "install web app" checkbox.
I'm not sure why this happens. Can you please send us the .aip (project file) to support at advancedinstaller dot com so we can take a look?
Dan: I was not able to find the Update Features Install States custom action, but to that note, I also did not see a Progress Dlg custom action.
If you are not using the installing features based on condition approach (by setting installation conditions on features from "Organization" page), then the related custom action will not be included in the setup project. So, if you are not adding install conditions to your features from "Organization" page please ignore my colleague suggestion.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”