Hello, I need to install plugins (or add-ons) to an application we write. I user WiX for the installer of the application. A plugin is, in my mind, an optional part of the application. It needs to integrate into the file-system structure of the application, but it can also be added later, even by someone who does not have control over the installer of the original application. So I find all out of the box-mechanisms of WiX inadequate: neither small/minor/major update nor the patch mechanism seem to fit into the prerequisites stated in the previous phrase. So I find the best way for me is to let the original installer leave a registry-entry specifying in some way where to install the plugins, and build separate installers for the plugins. Which leaves open the question, how to proceed on uninstall, but that's an issue I can handle later. Does anyone have a better idea? Are there any mechanisms specifically for this in WiX which I'm not aware of? Thnx for your advice, N-Man
So I find the best way for me is to let the original installer leave a registry-entry specifying in some way where to install the plugins, and build separate installers for the plugins.
Yes, I believe that's the standard approach. Your main application installer can leave a registry entry about where to install plugins like this:
<Registry Id='WritePluginsLoc'
Root='HKLM'
Key='Software\Acme\Foo 1.x'
Name='PluginsLocation'
Type='string'
Action='write'
Value='[PLUGINSFOLDER]' />
The plug-in installer can then retrieve the registry entry like this:
<Property Id="PLUGINSFOLDER">
<RegistrySearch Id='PluginsLocationSearch'
Root='HKLM'
Key='Software\Acme\Foo 1.x'
Name='PluginsLocation'
Type='raw' />
</Property>
To automatically uninstall plug-ins along with the main product I'm afraid you'll have to write a custom uninstaller exe. This exe would have to know how to find the plug-in MSI product codes and would invoke msiexec /x
for each one.
A registry key is a popular way to solve this. A more Windows Installer centric way of creating a plug-in directory is to use a Component to create the plug-in directory and have others use a ComponentSearch for the Component/@Guid.
Uninstalling plug-ins at the same time as your app will be difficult (probably impossible) without an external bootstrapper/chainer managing your uninstall. It is far easier to decouple the uninstall of plug-ins from application completely so they can be removed independently.