cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
OliverTheFrog
Level 3

Launch after install requires delay for DLLs to work

I have an InstallShield project that places DLLs in the same folder as the application EXE. I've set things up so the user can launch the EXE after install, and the working directory is set to the EXE directory. Unfortunately if I immedialetly click the button to launch the EXE at the end of the install I get an error saying that the DLL can not be found. However, if I wait around 5 seconds, and then launch the EXE the same way, the DLL can be found.

Another thing I tried was rather than launching the EXE from the installer, I launched the EXE by double-clicking in the Windows file explorer. I get exactly the same result where I need to wait around 5 seconds for the application to be able to load the DLLs. It also seems to be all DLLs that are being affected.

If I copy all the DLLs to the install folder before doing the install, then I can launch the EXE without the wait.

This is the error I get:

"The program can't start because aaa.dll is missing from your computer. Try reinstalling the program to fix this problem."

Does anyone know how to fix this?
Labels (1)
0 Kudos
(3) Replies
Christopher_Pai
Level 16

I have never heard of this. What project type are you using? Is this reproducible on another machine / image?

Is it possible an antivirus program is running that is making these files unavailable until they have been scanned?
0 Kudos
OliverTheFrog
Level 3

I think I know what's causing this, but I won't be able to test it today because I don't have access to the computers at the moment. It was easily reproducible on multiple computers. But I'm pretty sure that the problem would only happen when I try installing the application on a user's network drive. Is it possible that the files may not exist on the user's drive by the time the application is attempted to be launched, since it has to be sent over the network to be saved to the user drive? Explorer does report all the files and all at their full size when I try unsuccessfully to launch the application. I'll try playing around with it next week to see exactly what's happening.
0 Kudos
OliverTheFrog
Level 3

I fixed the problem. It wasn't because of installing to a user's network drive since when I tested it on the local hard drive I had the same problem. I suspect Christopher's suggestion that it might be an Antivirus app preventing usage of the files until it has had the chance to scan the DLLs is the cause of the problem. Unfortunately I can't disable the Antivirus on these computers to verify that this is the reason because I don't have admin privileges (it's Symantec Endpoint Protection).

To fix the problem I wrote a launcher exe that waits until it has read access to all the required DLLs (along with some nice UI feedback so the user doesn't think it has hanged).
0 Kudos