WiX EmbeddedChainer cannot uninstall
Someone asked a very similar question, but the response was unhelpful. It would be extremely valuable if there was a knowledgeable answer...
I have created a WiX project using Windows Installed 4.5. I included an EmbeddedChainer element reference in the wxs file for the MsiEmbeddedChainer Table, which allows multiple-package installation.
<EmbeddedChainer Id="Chainer" FileSource="InstallMSI.exe" />
I looked around the net and finally found a single post that showed how this person retrieved a handle for the internal transaction. Now, my installer correctly calls my executable to process the chained MSIs. However, uninstalling does not work. Please note tha开发者_运维问答t without the above EmbeddedChainer element, the uninstall works fine.
I've read all the available document and I cannot find a single example project.
Can anyone provide some guidance in creating a WiX based multi-MSI install package?
The WiX documentation for EmbeddedChainer refers to the MSDN documentation for MsiEmbeddedChainer Table, which in turn directs you to reference Monitoring an Installation using MsiSetExternalUI
Rather than looking for a WiX specific example, I suggest looking for any MSI example. From there it will be fairly easy to figure out where you're going wrong with WiX.
The same embedded chainer executable Main() will be called again when uninstalled. In order for the chainer code to detect whether to install or uninstall, the parent installer should pass the argument to the chainer Main function. When uninstall, the parent installer has the property [REMOVE] set to the either "REMOVE=ALL" or "REMOVE=feature1,feature2". Set the EmbededChainer/@CommandLine to "REMOVE=[REMOVE]" and in the Main of the chainer code, parse the argument list and pass the data to the MsiInstallProduct() as argument. When the MsiInstallProduct() see the argument "REMOVE=ALL", the child MSI will perform the uninstall.
精彩评论