[wix-users] Capture MSI errors in Managed Bootstrapper

Farrukh Waheed farrukh1 at gmail.com
Thu Jan 21 23:00:01 PST 2016


Seems like this is handling Bootstrapper error, not MSI errors.See this :
http://sourceforge.net/p/wix/mailman/message/34108844/

However, I'm still implementing this to try it in any-case..

On 21 January 2016 at 20:57, Farrukh Waheed <farrukh1 at gmail.com> wrote:

> Hi Andreas,
> Thanks a bunch for such a detailed response. Its really informative and I
> will surely try to implement this....
> Really appreciating..
>
> Best regards
>
> On 21 January 2016 at 15:45, Andreas Buchner <Andreas.Buchner at inloox.com>
> wrote:
>
>> Hi,
>>
>> I don´t know if the following suits your needs, but we´ve done the
>> following:
>>
>> Attach the bootstrapper Error-Event:
>>         this._bootstrapper.Error += _bootstrapper_Error;
>>
>> In the attached method are the
>> Microsoft.Tools.WindowsInstallerXml.Bootstrapper.ErrorEventArgs available,
>> which provide some useful information:
>>         public IList<string> Data { get; }
>>         public int ErrorCode { get; }
>>         public string ErrorMessage { get; }
>>         public ErrorType ErrorType { get; }
>>         public string PackageId { get; }
>>         public int UIHint { get; }
>>
>> For example we´ve implemented a check for the "Ouf of disk space" error
>> like this:
>>
>> if (e.ErrorMessage.ToLower().Contains("out of disk space"))
>>         // display a localized error message
>>
>> Hope this helps a bit! :)
>>
>> Regards,
>> Andreas Buchner
>>
>> -----Ursprüngliche Nachricht-----
>> Von: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] Im
>> Auftrag von Farrukh Waheed
>> Gesendet: Mittwoch, 20. Januar 2016 05:59
>> An: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Betreff: [wix-users] Capture MSI errors in Managed Bootstrapper
>>
>> Hi Guys,
>> I think, some far years ago, I posted this kind of question, but still
>> wondering for any kind of solution. I apologize in advance it is duplicate
>> of some other post here.
>>
>> During installation through managed bootstrapper, we can capture msi
>> installation messages in  ExecuteMsiMessage event. But if there is any
>> failure/error occurred during msi installation, we need to properly capture
>> its description and error details from msi log.
>>
>> Is there any method to do so?
>> Is there any document for Error Codes with proper descriptions to be used
>> in our Managed Bootstrapper?
>> Or Is there some documentation about codes used in msi log and we can
>> parse through msi log and intercepts the error details????
>>
>> Any help would be really appreciated.
>>
>> Thanks
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant
>> http://www.firegiant.com/
>>
>
>


More information about the wix-users mailing list