Detect whether certain IIS features are present from InstallScript

1.6k views Asked by At

I have an InstallScript project written in InstallShield 2010, which, amongst other things, shells out to several .NET MSI installers that install web apps. If any of these web apps are selected for installation by the end user, I need to check for the following optional IIS features from InstallScript code before allowing the install to proceed:

  • ASP.NET (IIS 6+)
  • WCF HTTP Activation (IIS 7+)
  • IIS Metabase and IIS 6 configuration compatibility (IIS 7+)

Can anyone point me in the right direction please? Ideally I'm looking for registry values that I can check directly from InstallScript code, but I guess some kind of WMI or COM check would be OK as well.

PS: In case it's relevant, we need to support all versions of IIS from 5.1 onwards at this time. If 5.1 support is a problem, we may consider dropping it if we have to.

1

There are 1 answers

1
Lex Li On BEST ANSWER

Microsoft provides Powershell cmdlets for IIS 7,

http://technet.microsoft.com/en-us/library/cc732757.aspx

But for IIS 5.* and IIS 6, you are almost on your own (have to scan registry keys or %windir%\system32\inetsrv folder).