View Full Version : Weird problem with DLL for custom actions (error 1723)

11-06-2003, 11:19 AM
I'm having a really weird problem with a DLL I'm using for custom actions. Originally I had one function in it that was being used in a dialog. I added a second function and now the first one returns error 1723, "A DLL required for this install to complete could not be run".

Where it gets odd is that if I bypass this in the dialog (don't run the first custom action), the new function I added works fine. If I remove the name of the second function from the .def file, the original function works fine. The second function (which is supposed to be run in the execute sequence) Won't run at all in any case if I put it in the dialog or in the UI sequence.

I've tried removing everything associated with it and re-adding, but that doesn't seem to change anything. I created a small test project, just added a single fine and the custom actions, and they both worked fine. So I've somehow managed to fubar my install somehow, but I can't figure out what I might be able to do to fix it.

I'd really appreciate any help you can give me.

11-06-2003, 01:59 PM
Check your binary and custom action tables making sure that each of you custom actions is using the correct file from the binary table. You might have multiple entries which is causing the problem.


11-06-2003, 02:15 PM
Thanks for the reply. I just checked again, and the tables seem fine. There's only one reference to the file (NewBinary19), and both of the custom actions in the customaction table point to that as the source.

What's really driving me nuts is that the custom action in the dialog works when it's the only function listed in the DLL's def file, or when the whole DLL is in a different install project. I can't even imagine what could cause this problem.

I thought originally that it was a weird problem with the setupfiles, but I saw in the test install I made that the DLL doesn't need to be extracted. It's a windows installer type dll (functions get called with just the install handle, etc), and a basic MSI project.

11-06-2003, 02:51 PM
Since the DLL works properly in a new project, it has to be something specfic to yours.
Have you tried removing both custom actions and the reference to the dll in the binary table? If not try that, once removed, compile, then start to add each custom action one at a time. Compiling and testing after each one.


11-06-2003, 03:18 PM
I had done that earlier but added both actions back at the same time. I did it again (removed both custom actions, checked that they were gone from the custom action table and the file was gone from the binary table), and just added back the action that occurs in the dialog that has been failing. As soon as that function runs during the dialogs, I get the 1723 error.

And just for fun, I then deleted only the second (currently unused) function's name from the def file in the dll, recompiled, rebuilt the install, and ran it, and the dialog's custom action operates normally.

11-06-2003, 03:43 PM
Have you tried creating a new dll project just to see it is possibly something there? If you can upload it, I'll take a look. I've got a dll that I used in my projects that contains over 20 exported functions. I use them on dialogs and in the sequence tables.


11-07-2003, 10:55 AM
*blink blink* Ok, a test DLL with two empty functions worked fine. Why does this make me more confused? Well, guess I'll start by putting the existing functions into a new DLL. I'll report how that works out soon.

11-10-2003, 11:15 AM
I created a new DLL project and copied over the functions, changed and fixed up stuff a little, and the new DLL had the exact same problem as the old one. However, if I include functions from another DLL we use in a different install, it works fine. So there's something a bit strange about my DLL, but I still think there's a problem in the install project itself. Any more suggestions?

11-10-2003, 03:59 PM
*puts on his dunce cap* Found the problem. My installer DLL was dependant on a different DLL for DB access. Although my dialog custom action didn't use the other DLL, it still had to be present for it to work. Since no files had been installed, it didn't work. But if I didn't use that action, the later action ran fine because by then the DLL was installed to the product directory. This should be easy to fix now, it's not really related to installshield.

Thanks for the help.