The aim is to have our development
version of a dll found before a
pre-existing older one in %WINDIR%
etc. without having to write a program
just for that.
If the DLL is not in the same folder as the executable Windows will search for the file in the folders specified in the system path. So all you need to do is put your folder at the start of the path.
You can do this using the following batch command:
set PATH=c:\MyDLLFolder;%PATH%
If your path contains white space you need to use the following batch command:
set PATH="C:\My DLL Folder";%PATH%
But remember this path change is only made to the PATH of the current console session. If you close and reopen the console these path changes will be lost.