We have created a WiX installer for our project OpenRGB and I've run into an issue. I would like to be able to distribute OpenRGB plugins that have their own WiX installers. The main application installer creates an installation directory such as:
C:\Program Files\OpenRGB\
and copies things like the .exe and dependent .dll files into it.
Then, the plugins' installers install to:
C:\Program Files\OpenRGB\plugins\
and copy in a single .dll file for the plugin.
My issue is that whenever I install or upgrade the top level OpenRGB installer, it seems to wipe the entire install directory C:\Program Files\OpenRGB, deleting the plugins folder and all files that have been installed by the plugin installers, despite the plugin installers still being installed.
I am a noob when it comes to WiX configuration but I have looked around and not found a good answer as to why the plugin files are being deleted. I thought it should only delete the files that the installer itself created. I'm hoping someone more knowledgeable can help.
Our script for generating the main OpenRGB WiX installer XML is here:
https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/scripts/build-msi.sh?ref_type=heads
The script for generating one of the plugin WiX installers XML is here:
Edit: Appears to only happen on install or upgrade, not on uninstall. When uninstalling, the C:\Program Files\OpenRGB\plugins directory is left alone, but upon installing OpenRGB again, the installer removes the plugins directory.
RemoveFileorRemoveFolderExto do so, but you don't have that in your code. I'd suspect the application that you launch after installation to clean up the "plugins" directory.