I have several related Windows registry entries that I want to package inside MSI, so 1) there is a deletion process and 2) The fact that these registry entries were applied to this computer is documented using Add / Remove Programs.
The problem is that I can get Wix # to do it just fine, but I can only get MSI for assembly if all the registry entries are inside the Dir block, and this leads to the creation of a physical folder that I don't want on the target system.
As a temporary workaround, I ended up using Dir block by specifying a Temp layout folder. The installer does create a folder that I do not want; all i want is to use registry entries.
The WiX documentation describes its basic design, TargetDir, which essentially tells the installer to complete its actions on the target system. See http://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/write_a_registry_entry.html
In this native WiX XML example, it seems that there will be no extraneous folder on the target system; only the necessary entries in the registry will be applied. What Wix # syntax construct can be used to apply registry entries, but don't need to create the actual folder on the target system?
All the Wix # samples I've seen so far seem to have this side effect of creating the actual folder on the target system, whether you want it or not.
I know that perhaps I could do this by taking REG files from registry entries, compiling them into high temperature .wxs files, and then building them for msi with a candle and light. I am really trying to keep this in a C # / Wix # world. C # is a well-understood set of skills in my organization; WiX less. (Recognizing that Wix # is built on top of WiX features, and a certain degree of understanding of WiX and the Windows installer is important: it's a comfort zone thing, the ability to use C # instead of XML, and not a completely logical thing). Currently, we perform many of these registry settings tasks manually, without a trace and a simple and reliable uninstallation.
/// <summary> /// Configure the Event Log on a Windows (server) to have MyApplication Log settings and record an entry for it in Programs and Features. /// Note that this program creates the Windows Installer MSI that accomplishes this. /// This program creates a WiX XML file that is then compiled by the WiX Toolkit (Candle and Light) into the MSI file. /// </summary> internal class Script { public static void Main() { // Define a new Installer Project object var project = new Project("SetupMyApplicationEventLog" , // Provide dummy "Temp" install directory to satisfy WiX
}