Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
MakeSfxCA may produce dlls not following PE / COFF spec leading to Error 1723 #4502
In rare but easily hand-crafted cases MakeSfxCA produces native dlls not following the PE / COFF spec. In practice this leads to very hard to find errors. When trying to run an affected custom action an error 1723, i.e. "A DLL required for this install to complete could not be run", pops up.
Recipe to reproduce the bug
When you dump the wrapped CA.dll-file with
you get something like (excerpt)
This is wrong (search for "pecoff_v83.docx", cf. http://stackoverflow.com/questions/11107095). The entries are supposed to be sorted (by ASCII) in order to do a binary search
My educated guess is, when loading code from the dll the binary search fails, resulting in the error.
If I had to guess, changing line 519 of src/DTF/Tools/MakeSfxCA/MakeSfxCA.cs to
would fix this. I don't have time to change and test that now but I encourage someone to try it.
Either this is not fixed in 3.9, or there is another issue at play. I cannot seem to isolate it into a sample project, but consider the following outputs from DumpBin against working and non-working *.dll's:
Working (Zip* actions removed):
It's possible there's a related problem but you're not hitting any known limits.
@wixbot I am having a similar issue using v3.10, I have three methods that start with Remove:
When I added RemoveStartup it started to report DLL missing error, changed the name to ZKK and it worked, after that changed to DeleteStartupShortcut and all is good.