Page 1 of 1

DLLLOADFAILED only on rare occasions

Posted: Thu Oct 30, 2008 11:22 am
by quintonmartin
I have run my install at about 40 sites, with anywhere from 2 to 20 workstations per site. At about 4 of the sites, the install will get the DLLLOADFAILED error when attempting to execute a function from a DLL I have written and installed. The command is being run after the apply install. I did call the SetCurrentDirectoryA function. I do use the full path to the DLL. As I say, it works 90%+ of the time but some machines just keep failing. I've looked at all the topics in this form regarding the DLLLOADFAILED message and none of them solve the problem. The users running the install appear to be administrators on their PCs. Most PCs are XP (maybe all, I'm not sure). Tried logged on with different ID's with no change.

I end up manually performing the processes that are skipped in the install because of the error, but would like to know why this is happening on these few PCs. I cannot duplicate the error on any of the PCs I have available at my location.

When it does fail, I see that the DLL installed where it should be (the target directory where my other program files are installed). I can re-run the install many times, even after reboot or login with different user and it still fails on the PC with the same error. Often only 1 or 2 PCs at the same location will have the problem, and several other PCs at the location will not have the problem.

Anybody have any suggestions?

Posted: Fri Oct 31, 2008 10:41 am
by ulrichard
Did you check with depends.exe if all the required libraries are available?
http://www.dependencywalker.com/

Does it work if you call the dll functions on these machines from a separate script or application?

Maybe diskmon or regmon can help spotting some security restirctions specific to those machines.
http://technet.microsoft.com/en-us/sysi ... 96646.aspx

Rgds
Richard

Posted: Fri Oct 31, 2008 10:46 am
by quintonmartin
Hi Richard,
Thanks for the reply. I did use Depends and it shows the same results as my PC where it works fine. I guess what I'll try next is writing a quick little EXE that tries to call the DLL function that I'm doing in the install script and see if I get a more descriptive error message or something. The client indicated that it failed on his two XP machines, but worked just fine on his other Win2K machines.

Thanks for your suggestions, I'll give them a try.