Is it possible to add a directory to DLL search path from a batch file or cmd script?
问题 MSDN says that the function SetDllDirectory() can be used to insert a directory into the DLL Search Path. Can this function be accessed from a batch file or cmd script, perhaps using via cscript? 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. Thanks in advance for your time and thoughts. 回答1: You can place the DLL in the same path as the executable, which is searched first before