The CWDIllegalInDllSearch registry entry can be used to remove the current working directory (CWD) from the DLL search order. I highly recommend setting this registry entry as it protects from DLL hijacking attacks:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]
"CWDIllegalInDLLSearch"=dword:ffffffff
global.reg
Some applications do not work properly when the
CWDIllegalInDllSearch
registry entry is used. Such applications typically do not even start and might silently terminate without any error message.
Fortunately, you can use application-specific settings which take precedence over the global setting. I know of the following applications that require such a setting:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\popcapgame1.exe]
"CWDIllegalInDllSearch"=dword:00000002
plants-zombies.regWindows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\age2_x1.Exe]
"CWDIllegalInDllSearch"=dword:00000002
aoc.reg