This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Using Windows Installer Properties to Dynamically Modify IIS Settings
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 27, 2012
03:07 PM
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.
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.
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 28, 2012
08:49 AM
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 28, 2012
09:23 AM
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.
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 28, 2012
10:29 AM
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.
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 29, 2012
11:22 PM
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.
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 02, 2012
03:32 PM
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).
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).
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)