Erci.Triodor
Posts: 4
Joined: Fri Sep 25, 2009 11:29 am

IIS check in vbscript

Hello,

I want to check if IIS is already installed when OS is XP and MS Server 2003. If not installed, I want to terminate installation. If OS is Windows 7, Vista, and MS Server 2008, I want to install IIS by custom actions.

In order to accomplish this request, I have created a vbscript, which checks if IIS is already installed when OS is XP, but I am unable to terminate(stop) installation because I should work this vb script before installing prerequisites. If OS is Windows 7, Vista, and MS Server 2008, I run a custom action, which installs IIS. This works as expected, but I am not able to stop installation process if OS is XP and MS Server 2003 and IIS is not installed.

How can I stop installation if OS is XP and MS Server 2003 and IIS is not installed?

Regards,
jtroyan
Posts: 20
Joined: Mon Oct 19, 2009 9:41 pm

Re: IIS check in vbscript

Click on the prerequisites link and in the right hand window under predefined launch conditions, click the IIS checkbox, and set your minimum install level. For Win2k8 and above, I found that the check function doesn't work, since WAS is installed, and adds the IIS files, so AI thinks IIS is installed, even if it isn't defined as a role. They are going to add another check (I hope), to a future version.

Below are steps you can use (thanks to Bogdan) to check for Win2k8 and Win7, to determine if IIS is installed there. This should work for XP and Win2k3, based on this REG key that I use:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\DisplayName\

If that key is there, IIS is installed as a role, and active.

Hope this helps. :)

For the moment you can also use this registry key as follows:

-- create a registry search from the Search page for the key you've specified
-- save the .aip file
-- open the .aip file with a text editor (Notepad++ for example) and edit this line:

<ROW Condition="AI_IISSEARCH OR AI_IISSEARCH_EX"
Description="[ProductName] cannot be installed on systems with Internet Information Services version smaller than [AI_MINIISVERSION]"
DescriptionLocId="AI.LaunchCondition.IIS" IsPredefined="true"
Builds="DefaultBuild"/>

-- set the parameter "Condition" to the following value:

"AI_IISSEARCH OR AI_IISSEARCH_EX OR CUSTOM_SEARCH"

-- assuming that "CUSTOM_SEARCH" is the name of your search (the one that looks for the registry key)
-- save the .aip file
-- open it with Advanced Installer and rebuild the package

Now your custom launch condition should also check for the registry entry.
Henry Andrews
Posts: 1
Joined: Thu May 08, 2014 5:40 pm

Re: IIS check in vbscript

Erci.Triodor wrote:Hello,

I want to check if IIS is already installed when OS is XP and MS Server 2003. If not installed, I want to terminate installation. If OS is Windows 7, Vista, and MS Server 2008, I want to install IIS by custom actions.

In order to accomplish this request, I have created a
e cig vbscript, which checks if IIS is already installed when OS is XP, but I am unable to terminate(stop) installation because I should work this vb script before installing prerequisites. If OS is Windows 7, Vista, and MS Server 2008, I run a custom action, which installs IIS. This works as expected, but I am not able to stop installation process if OS is XP and MS Server 2003 and IIS is not installed.

How can I stop installation if OS is XP and MS Server 2003 and IIS is not installed?

Regards,
Why this software is not compatible with my OS version. My operating system is win 8.1. I hope I will get better solution from your forum.
Last edited by Henry Andrews on Sun May 25, 2014 8:50 pm, edited 1 time in total.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: IIS check in vbscript

Hello and welcome to Advanced Installer forms,

Thank you for your interest in Advanced Installer.

I'm afraid I don't fully understand what you mean. Can you please give us more details about this (maybe exemplify)? The Advanced Installer application and its generated setup packages is fully compatible with Windows 8.1 operating system.

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

Return to “Common Problems”