cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Ron_Schaeffer
Level 6

Using Windows Installer Properties to Dynamically Modify IIS Settings

I'm using this title purposely - because it is a Help topic title and I see the same instructions in it version after version, and either I misread it year after year, or else it simply doesn't work the way it says. [Yes, it is annoying me]

Here is a snippet from the text:
For Basic MSI and InstallScript MSI projects, you can configure an IIS setting dynamically at run time through the use of Windows Installer properties. This enables you to let end users specify the name of the virtual directory, the TCP port, the site number, or other IIS settings for the Web sites, applications, virtual directories, application pools, and Web service extensions that they are installing on the target machine.

Windows Installer uses MsiFormatRecord to resolve the property at run time. The installation writes the property and its value to the following registry key so that the value is available during uninstallation and repair:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield Uninstall Information\{ProductCode}

Therefore, if your Web site is installed to an end user–specified site number, the Web site, its applications, and its virtual directories can be successfully uninstalled from that site number.


My issue is that despite everything I try, I do NOT find that the installer saves any private/custom properties I use to dynamically modify my IIS settings. And yet that is exactly what it says it does in the above quote.

A minor issue is that the uninstall key is incorrect as well - the standard stuff (e.g., ARPINSTALLLOCATION) which is saved is written to "... CurrentVersion\Uninstall\{ProductCode}".

What am I missing? Has this been answered in past posts (I did search but didn't spot anything)?

Thanks.
Labels (1)
0 Kudos

(5) Replies
ch_eng
Level 7

Ron Schaeffer wrote:

My issue is that despite everything I try, I do NOT find that the installer saves any private/custom properties I use to dynamically modify my IIS settings. And yet that is exactly what it says it does in the above quote.


What does your Internet Information Services configuration look like? I can verify that this does work in InstallShield 2011 with an InstallScript MSI project.

Ron Schaeffer wrote:

A minor issue is that the uninstall key is incorrect as well - the standard stuff (e.g., ARPINSTALLLOCATION) which is saved is written to "... CurrentVersion\Uninstall\{ProductCode}".


I think the location of the uninstall key changes and may be dependent on InstallShield version and/or project type - but not certain.

HTH
0 Kudos
Ron_Schaeffer
Level 6

I should have mentioned - mine is a Basic MSI project.

And don't misunderstand - using properties in IIS does work - what doesn't work is the implied magically saving of these properties in the registry so that Maintenance / Repair / Removal all work automatically - I can find no evidence of any such automatic property preservation.

I have attached a snapshot of the IIS area in an IS project.
0 Kudos
ch_eng
Level 7

OK - I was able to get this to work (have IIS properties show up in uninstall key) with a Basic MSI project. This is what I did:

1) create a new Basic MSI project

2a) in IIS settings: add new application pool (called [BASIC_APP_POOL])
2b) in IIS settings: add new website (called Default Web Site; port 80; site # 1)
2c) in IIS settings: add new web application (called [BASIC_WEB_APP])

3a) in Dialogs: create a new Interior Wizard Panel dialog
3b) in Dialogs: add a new Edit Field to the dialog for [BASIC_APP_POOL]
3c) in Dialogs: add a new Edit Field to the dialog for [BASIC_WEB_APP]

4) add a file to the project (ex: index.html)

5) build and install the project

6) I checked the registry and found the custom values for both BASIC_APP_POOL and BASIC_WEB_APP in:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield Uninstall Information\{9930A7AC-C664-4E50-BFB6-6839464FB7AA}

I have attached the .ism file - hope it can help. Rename it to .ism.
0 Kudos
Ron_Schaeffer
Level 6

I don't know what to say - your trial works. So I quickly created my own trial and it too worked. Now, I'm going to have to dig really deeply into my existing large production project and try to figure out why it does NOT work.

Well, I think someone once said: "knowing it is possible is half the battle" (or some such).

Thank you for setting me right here.

Now, if anyone has any idea why this wouldn't work for an existing project which originated several versions ago and has been through all the IS version upgrades - feel free to reply.
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

Does the property IS_IIS_DO_NOT_USE_REG exist in your project anywhere (such as the Property Manager)? This property is used to suppress writing any IIS resolved property information to the registry.

Besides the above property, older versions of InstallShield (pre-IS 2011) would need elevated privileges while running the ISIISCosting action to correctly write property values to the registry. This was resolved in IS 2011 by writing the values during the ISIISInstall action which runs in system context. You may also verify that the ISIISInstall action is set to run as deferred in system context if this project has been migrated across product versions (though actual IIS resource installation would fail if this were not running elevated).
0 Kudos