Showing posts with label Managed bootstrapper. Show all posts
Showing posts with label Managed bootstrapper. Show all posts

Tuesday, March 29, 2016

Burn: w327: Will not uninstall package...


Often, while testing burn based installers, I faced this while Uninstalling the Bundle:


[371C:31D8][2016-03-29T10:17:20]w327: Will not uninstall package: Client, found dependents: 2
[371C:31D8][2016-03-29T10:17:20]w328: Found dependent: {ac89aba7-d9da-4814-b665-8879004bcd8e}, name: EMS 2016
[371C:31D8][2016-03-29T10:17:20]w328: Found dependent: {af2cf989-bff2-466f-b0e6-9461caabc59a}, name: EMS 2016

This happens, when Product Code of package (Client in my case) is left in registry. Here is mine in this case:
HKEY_CLASSES_ROOT\Installer\Dependencies\{68055460-0787-4ED4-BC4D-422F5959EDD8}


I had to open my Client.msi in Orca.exe to get its Product Code, because in my Wix, I'm using * in product code which might be generating a new code on every build.

Dependencies {ac89aba7-d9da-4814-b665-8879004bcd8e} and {af2cf989-bff2-466f-b0e6-9461caabc59a} should be under above mentioned registry; Here's a screen shot:


So how to get rid of these, when Burn/Bundle refuse to uninstall it:

  1. Uninstall msi package
    • From original MSI file, right click on it and choose Uninstall and proceed 
    OR
    • From command line, type "msiexec /x {PRODUCT CODE OF MSI}
    for example in my case here: msiexec /x {68055460-0787-4ED4-BC4D-422F5959EDD8} and follow the instructions.


  2. Now if above registry key is still intact, simply remove it.






Thursday, July 10, 2014

Wix Bootstrapper: Exit/End during installation.

 


During CacheAcquireProgress Event:
this.model.BootstrapperApplication.CacheAcquireProgress += (sender, args) =>
{
//if ever detected InstallState.Cancelled (which can be set from other event like Exit Button Click)
if (this.State == InstallState.Cancelled)
args.Result =
Result.Cancel;
//this would quit installation process.
.
.
.
};
During ExecuteProgress Event:
this.model.BootstrapperApplication.ExecuteProgress += (sender, args) =>
{
//if ever detected InstallState.Cancelled (which can be set from other event like Exit Button Click)
if (this.State == InstallState.Cancelled)
args.Result =
Result.Cancel; //this would quit installation process.
.
.
.

};

So if InstallState.Cancelled is ever setup, it would set args.Result=Result.Cancel and so it would quit installation.

Friday, May 16, 2014

Bootstrapper Error 0x8013101b: Failed to create the managed bootstrapper application.

I developed Wix Burn based Managed bootstrapper, which required .Net Framework v4.0.xxx. It worked perfectly fine when I tried on Windows XP + Service Pack 2. That is, it initially launched .Net FW 4 Setup, which I packed in my Burn Package, and then launched my Boostrapper Installer.

But on Windows 7 without Service Pack 1, it was crashing with following log:
[0530:0B50][2014-01-21T11:39:50]i000: Loading managed bootstrapper application.
[0530:0B50][2014-01-21T11:39:51]e000: Error 0x8013101b: Failed to create the managed bootstrapper application.
[0530:0B50][2014-01-21T11:39:51]e000: Error 0x8013101b: Failed to create UX.
[0530:0B50][2014-01-21T11:39:51]e000: Error 0x8013101b: Failed to load UX.
[0530:0B50][2014-01-21T11:39:51]e000: Error 0x8013101b: Failed while running 
.
After some searching and digging, I finally able to solve it by editing BootstrapperCore.config file. Initially, it was:
< startup useLegacyV2RuntimeActivationPolicy="true" >
        < supportedRuntime version="v4.0" / >
        < supportedFramework version="v4\Client" / >
         < supportedRuntime version="v2.0.50727" / >

< /startup>
         

I removed < supportedRuntime version="v2.0.50727" / >. This causes bootstrapper to launch .Net FW 4.0 installation (Packed with as payload). 

Remember, on Windows 7 without SP1, there is .Net framework 3.5. So supportedRuntime version="v2.0.50727" causing the bootstrapper trying to use Net FW 2.0 or 3.5 and so failing, as my Bootstrapper is based on .Net FW 4.

Now, t updated the machine with .Net FW 4 and then launched my bootstrapper, and now working like charm.. :)