davidheagy
Posts: 2
Joined: Thu Sep 01, 2011 5:30 pm

The dialog ErrorDlg has the error style bit set, but is not

I am using Advanced Installer 8.3 build 36963 and am trying to setup an event log source within a custom action.

I have created a .Net Installer Custom Action on the Commit phase of the InstallExecuteSequence. I selected the file to run the custom action from and set the Execute Options to "Commit with no impersonation". Nothing else was changed but I keep getting the following error:
The dialog ErrorDlg has the error style bit set, but is not an error dialog.
If I remove the custom action then everything works fine. When I look in the install log I see this:
MSI (s) (48:68) [10:26:57:354]: Invoking remote custom action. DLL: C:\Windows\Installer\MSICFB6.tmp, Entrypoint: LaunchDotNetCustomAction
MSI (c) (EC:74) [10:26:58:057]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg

Error 2869. The dialog ErrorDlg has the error style bit set, but is not an error dialog.
MSI (c) (EC:74) [10:38:08:885]: Product: EPWeb -- Error 2869. The dialog ErrorDlg has the error style bit set, but is not an error dialog.

Error 1001.
MSI (s) (48!28) [10:38:08:885]:
MSI (s) (48:68) [10:38:08:885]: Leaked MSIHANDLE (143) of type 790531 for thread 1064
MSI (s) (48:68) [10:38:08:900]: Note: 1: 2769 2: dotNetCustAct.dll 3: 1
Info 2769. Custom Action dotNetCustAct.dll did not close 1 MSIHANDLEs.
CustomAction dotNetCustAct.dll returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
My installer class looks like this:

Code: Select all

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;

namespace EventPro.Web {
	[RunInstaller(true)]
	public partial class ProjectInstaller : System.Configuration.Install.Installer {
		public ProjectInstaller() {
			InitializeComponent();
		}

		public override void Commit(IDictionary savedState) {
			base.Commit(savedState);

			if (!System.Diagnostics.EventLog.SourceExists("EventPro.Web")) {
				System.Diagnostics.EventLog.CreateEventSource("EventPro.Web", "Application");
			}
		}
	}
}
Could anyone please help me out. Thanks.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: The dialog ErrorDlg has the error style bit set, but is

Hi and welcome to Advanced Installer forums,

This type of error can have multiple causes. However, here is a FAQ article that deals with it.

Unfortunately, our support boundaries do not cover debugging custom actions.
Here are a couple related articles to help with this:
http://www.advancedinstaller.com/user-g ... et-ca.html
http://www.advancedinstaller.com/user-g ... rp-ca.html

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
davidheagy
Posts: 2
Joined: Thu Sep 01, 2011 5:30 pm

Re: The dialog ErrorDlg has the error style bit set, but is

I had already gone through that FAQ and I couldn't find any problems with my paths or with my custom action code. I created a console app that did the same thing and ran it as a custom action without any problems. I did try putting debug information into the code but it didn't appear to be even loading the dll to run the custom actions.

So then I tried your suggestion of using a fully fledged C# custom action dll that you gave in your second link and that worked.

It would of been nice to get the .Net Installer Class Action to work but if those don't work I guess I will make due with this.

Thank you very much for you help.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: The dialog ErrorDlg has the error style bit set, but is

Hi,

If it didn't even load, perhaps your DLL is not a fully working installer class. Perhaps this tutorial will help you:
http://devcity.net/Articles/339/1/article.aspx

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
talderson
Posts: 2
Joined: Thu Mar 15, 2012 6:16 pm

Re: The dialog ErrorDlg has the error style bit set, but is

Did you ever get this fixed? I had a similar issue and I had to attach to the Install method and reattach the Installer class. Also, I think you need to make sure you add an action text for some reason. It's flaky which is probably why it's so poorly supported. Also, you'll notice there's a 32 and a 64 bit icon added to the InstallExecuteSequence you need to add both if you want the action to run in both streams.

Hope you got it going. I know how frustrating these installers can be. It's still one of the better ones out there if the installer is seen as a necessary evil instead of something that needs to be treated as a real project.

Return to “Common Problems”