Laurin
Posts: 58
Joined: Thu Jun 12, 2008 4:27 pm

.NET Installexception doesn't show a proper error dlg

Hi guys,

there was a time..... when i throwed a installexception in my .net custom action - the errordlg showed me a the message of the exception.
But now... i only get this stupid message: "The dialog ErrorDlg has the error style bit set, but is not an error dialog."
whats the problem there?

thank you in advance
Laurin
Posts: 58
Joined: Thu Jun 12, 2008 4:27 pm

Re: .NET Installexception doesn't show a proper error dlg

oh i just noticed... this is not only in case a installexception is thrown.... even windows installer errors aren't shown. always: The dialog ErrorDlg has the error style bit set, but is not an error dialog.

and therefore a log looks like this:

Fehler 2869. The dialog ErrorDlg has the error style bit set, but is not an error dialog.
Fehler 1001.
Fehler 1001.
=== Protokollierung beendet: 06.09.2010 10:35:13 ===
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: .NET Installexception doesn't show a proper error dlg

Hi,

This error message is always shown when an exception occurs in a .NET Installer class action. It was always like this. Perhaps you used another type of custom action in the past. You can find more details in the Why do I receive the 2869 error FAQ.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Laurin
Posts: 58
Joined: Thu Jun 12, 2008 4:27 pm

Re: .NET Installexception doesn't show a proper error dlg

i'm sure i had a way to show a message... perhaps i did it with this.Context.LogMessage()....
i'll try this,
thank you!
benhinman
Posts: 37
Joined: Wed Aug 06, 2008 7:50 am

Re: .NET Installexception doesn't show a proper error dlg

Hate to ressurect this but Laurin was correct.

There was a time - I cannot remember exactly when, but an exception throw from a .NET custom action would be displayed in an error dialog.

As it stands, I have to catch the exception, show a message box using windows forms, then finally throw an exception to cause a rollback. The installer will subsequently show the error "The dialog ErrorDlg has the error style bit set, but is not an error dialog".

Obviously our users aren't exactly happy when they see this...

All the reading I have done on this suggests that .NET custom actions simply cannot gracefully force a rollback. Therefore I am going to convert all my .NET installer classes to executables and call them that way. At least the error message "there is a problem with this windows installer package..." is slightly nicer!

Don't suppose anyone has any gems to offer up here?

Thanks,
Ben

Return to “Common Problems”