How to force re-write of registry values during maintenance/modify?

M

Michael Kleehammer

During my initial install, the user enters some information (ODBC settings)
that are written to the registry using public properties. If the user
attempts to modify their install, I can repopulate the dialog from the
registry, but any changes the user makes are not written to the registry.

The registry settings are packaged into a single component with the
existence of the registry key used as the 'key' for the component. I
suppose the new values are not written since Windows Installer is designed
to add or remove components/features, but not to modify them.

Is there a way I can force WI to write the registry values even if they are
already there? Is there an internal property I can set in maintenance mode
to force a particular component (the registry values) to be re-installed?

Thanks,
Michael
 
C

Carolyn Napier [MSFT]

If your component has the msidbComponentAttributesNeverOverwrite bit set then
the Installer won't overwrite the settings.

The Installer is designed to handle maintenance mode reinstalls/repairs of
components. It's required for patching to work. However, the trigger at the
component level is based upon the feature's action/request state (and to some
extent the original install state). As for maintenance mode installations, the
component will only be reinstalled if the feature to which the component belongs
has an action/request state of REINSTALL. (So basically that feature needs to be
added to the REINSTALL property).

You should be able to see the decisions made by the Installer during the install
transaction by generating a verbose log file. Two good places to check:
CostFinalize action and InstallValidate action in the log file. In the
CostFinalize, look to see if the component is getting disabled via the keypath
check (maybe a higher version exists, etc.). You would usually see a message
along the lines of "Disallowing installation of component: ".

In the InstallValidate action dump, you'll find the install, request, and action
states of all features and components as recorded up to that point. It's a good
way to see if your component is actually being set to reinstalled.

Hope this helps,
- Carolyn Napier
Microsoft Windows Installer Team

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.

MSI FAQ:
<http://www.microsoft.com/windows2000/community/centers/management/msi_faq.mspx>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top