View Full Version : Components which have no KeyPath - how does WI detect them as installed?

04-12-2002, 03:50 PM
Developer 7.02, standard project.

I have several components (some of them in custom merge modules, others in my current ISM project) which do not have the KeyPath set simply because they do not include any files or registry entries.

The merge module components are just wrappers around SETUP.EXE type applications (which are contained in the binary table of the respective merge module); the other components do things like set environment variables.

our installation/product is in alpha testing, and I am looking at an issue on a user's machine where the product was installed by a user with ADMIN privileges, and then another user account (a normal user) was used to test the application. When the second user logs in, it looks like windows installer is attempting self-repair because it can't detect the prescense of some of the components I've mentioned above.

My question is, for components which don't include files/reg keys ahd hence DONT (can't?) have the KeyPath set, how does Windows Installer detect if the component is actually there?

I'd like to set a KeyPath if I could, but I'm not sure what other options are open to me. Is there any tricks I can use to set a KeyPath without modifying the components to ship dummy files or create dummy registry entries?



Stefan Krueger
04-13-2002, 12:09 AM
If you don't explicitly specify a key path for a component, Windows Installer uses the destination directory as key path.

04-13-2002, 08:51 AM

What you have described is OK for components in my current ISM which simply set ENVIRONMENT variables or whatever.

What about my own custom merge modules which contain EXEs which are run (the EXEs are in the BINARY table of the merge module). These EXEs install shared components such as MDAC or SUN's JRE runtime.

They do not install any files in my applications' [INSTALLDIR].

The directory associated with the components inside the merge module is [TARGETDIR].

How does Windows Installer know that the merge module component is installed, if it does not have a KeyPath set, and it does not install any files?


Stefan Krueger
04-13-2002, 11:00 AM
If you run a setup like mdac_typ.exe as a custom action and the exe is stored in the binary table, then no component (in the Windows Installer meaning of the word) is related. This is how InstallShield's MDAC merge module works.

If you add the mdac_typ.exe to a component (instead of stroing it in the binary table) it will be copied to the user's computer - nad that directory will be the key path for the component.