Dot Local File to Fix Hell DLL Issues?

I read that placing an empty file named <AppName>.exe.local in the application directory will cause the application to first look in this directory for DLLs and OCXs to avoid problems with conflicting DLLs and OCXs found elsewhere on the system.

But doesn't the application look anyway in the application directory? What effect does the .local file have?

+4
source share
2 answers

To be honest, I had never heard of the .local scheme before, but a quick search brought up this article , which fully explains this:

For the foo.exe application, if there is a foo.exe.local file, Windows will first look for the foo.exes application directory before starting a regular dll search. To mitigate the COM problem, redirection applies to both a full DLL load and a partial name load.

It seems that the .local file first forcibly searches for the absolute path in the application directory, whereas usually the absolute paths remain unchanged, and only relative paths follow the DLL Search Order .

+2
source

Applications may depend on a specific version of a shared DLL and crash if another application is installed with a new or older version of the same DLL. There are two ways to ensure that your application uses the correct DLL: redirecting the DLL and side-by-side components. Developers and administrators should use DLL redirection for existing applications because it does not require any changes to the expression. If you are creating a new application or application update and want to isolate your application from potential problems, create a side-by-side component.

Ref .: Redirecting the dynamic link library

+1
source

All Articles