cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sumitintouch
Level 2

How to Configure IIS 7.5 with Installscript on IS 2011

We are currently working on a 64 bit Web Application Installer which should have both IIS 6.0 and IIS7.5 support with Installshield 2011( Installscript based project). Our installer is working fine for IIS 6.0 but for IIS 7.5 how we should invoke the appcmd.exe?For IIS 6.0 we have written a custom function which does the following:

// Step 1: Add script name to the FilterLoadOrder
Read each line and look for FilterLoadOrder string . If szScriptName isn't already in the list, add it and call command to commit it

// Step 2: Delete and add the actual filter in IIS

// Step 3: Set the filter path for HPWD Installer i.e.

svCommand = "cscript.exe //nologo " + svUtilScript + " SET W3SVC/Filters/" + szScriptName + "/FilterPath \"" + szInstallDir ^ "bin\\isapidrv.dll\"";

// Step 4: Setup the registry keys
// Set the DefaultAppPool Identity type to local system (0).

Now my question is how should I frame this for IIS 7.5 or rather what are the IIS commands I need to invoke for for my new function. Appreciate a speedy response at your end.

Thanks,
Sumit
Labels (1)
0 Kudos
(1) Reply
sumitintouch
Level 2

Below are the detailed steps to configure/unconfigure HPWD in IIS7.5. These steps have to be automated from the installer.

Pre-requisite: This need to be documented in the I&C guide
1. ISAPI filter module should be enabled for IIS7.5
- Detailed steps are available at http://www.iis.net/ConfigReference/system.webServer/isapiFilters under section "Setup -> Windows 2008 R2"


Steps to configure HPWD in IIS7.5:
1) Give "Full Control" permission to IIS_IUSRS grp on:
- HPWD Registry entry: HKEY_LOCAL_MACHINE/HP
- HPWD install dir, example: C:/Program Files/HP

2) Enable ISAPI-dll Execute option
appcmd set config "Default Web Site" /section:handlers /accessPolicy:Read,Script,Execute

3) Add the filter dll
appcmd set config /section:isapiFilters /+[name='',path='"\bin\isapidrv.dll"',preCondition='bitness64']
where:
hpwdScriptName: script name provided by the user during installation
HPWDInstallDir: installation directory provided by the user during installation

4) Set ISAPI and CGI restrictions
appcmd set config /section:isapiCgiRestriction /+"[path='\bin\isapidrv.dll',description='HPWDFilter',allowed='True']"
where:
HPWDInstallDir: installation directory provided by the user during installation

5) Create mwdlldir and mwimagedir virtual directories
appcmd add vdir /app.name:"Default Web Site/" /path:/mwimagedir /physicalPath:"\imagedir"
appcmd add vdir /app.name:"Default Web Site/" /path:/mwdlldir /physicalPath:"\bin"
where:
HPWDInstallDir: installation directory provided by the user during installation

6) Restart IIS server

NOTE: Pls ensure that the installation dir path has all backward slashes (\) only in the path.

Steps to Unconfigure HPWD in IIS7.5:
1) Delete the filter dll
appcmd set config /section:isapiFilters /-[name='']
where:
hpwdScriptName: script name provided by the user during installation

2) Unset the ISAPI and CGI restrictions for the filter dll
appcmd set config /section:isapiCgiRestriction /-"[path='\bin\isapidrv.dll',description='HPWDFilter',allowed='True']"
where:
HPWDInstallDir: installation directory provided by the user during installation

3) Delete the mwimage and mwdlldir entries
appcmd delete vdir /vdir.name:"Default Web Site/mwimagedir"
appcmd delete vdir /vdir.name:"Default Web Site/mwdlldir"

4) Restart IIS server

Let me know if you need any clarifications.
0 Kudos