Hi,
I have changed my installer boostrapper from NSIS to Bundle because I had to install C++ VCRedist with my application and found it was rather simple this way.
It seems to work fine (even if I still need to check if Redist are already installed) but now I'm not able to uninstall anymore.
Here is the error message I got:

Here is the log file:
MyProduct_20200509005154.log
Here is the code that I use to create the bundle:
private static void BuildBundleBootstrapper(Version version, string rootPath, string project)
{
var vcRedistPackage = new ExePackage()
{
Vital = true,
Compressed = true,
SourceFile = Path.Combine(rootPath, "ThirdParty", "VC_redist.x64.exe"),
//DownloadUrl = @"https://aka.ms/vs/16/release/vc_redist.x64.exe"
};
var bootstrapper =
new Bundle(ProductName,
vcRedistPackage,
new MsiPackage(project)
{
DisplayInternalUI = true,
});
bootstrapper.IconFile = Path.Combine(rootPath, "logo", "logo.ico");
bootstrapper.Version = version;
bootstrapper.Manufacturer = Manufacturer;
bootstrapper.Compressed = true;
bootstrapper.UpgradeCode = new Guid(BundleId);
bootstrapper.Application.LogoFile = Path.Combine(rootPath, "logo", "logo-64.png");
bootstrapper.Application.LicensePath = null;
bootstrapper.Application.AttributesDefinition = "ShowVersion=yes; ShowFilesInUse=yes";
bootstrapper.Include(WixExtension.Util);
bootstrapper.IncludeWixExtension(@"WixDependencyExtension.dll", "dep", "http://schemas.microsoft.com/wix/DependencyExtension");
bootstrapper.PreserveTempFiles = true;
bootstrapper.SuppressWixMbaPrereqVars = true;
var setup = bootstrapper.Build(Path.ChangeExtension(project, "exe"));
Console.WriteLine(setup);
}
Note that the BundleID is a new GUID I have generated for this new implementation, but I kept the same ProductID as before.
Do you have any clue why I can't uninstall? Once I'm in this state how can force an uninstall?
There is a chance that one of the packages (either VCdisrt or your msi). But this cause you probably already ruled out by testing the package individually.
It is also possible that NSIS bootstrapper triggers the error but this is something that I cannot help you much with. NSIS support is an extension to WixSharp and I am no expert in NSIS. Sorry. Hopefully NSIS knowledge base search can revile something.
=======
Interestingly enough your very scenario was the use case for "Simplified Bootstrapper" sample that uses raw MSI+WixSharp. Basically the bootstrapping is mimicked via pre-launch Custom Action.
MSI uninstall log should give more details about the error.
Yep, this is what I meant "But this cause you probably already ruled out by testing the package individually."
Investigating MSI uninstall logs must be the first step of the investigation.
Thank you for your help, you were right !
It was due to a custom action that was killing a specific processus, but could throw because accessing to the "MainModule" of a 64 bit process from a 32bit process raises an exception.
Great. Thank you for letting us know.
Thank you Tigran for being on standby 馃槃
Most helpful comment
MSI uninstall log should give more details about the error.