Sets the per-process mode that the _WinAPI_SearchPath() function uses when locating files
_WinAPI_SetSearchPathMode ( $iFlags )
|$iFlags||The search mode to use. This parameter can be one of the following values.
Optionaly, $BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE can be combined with the following flag to make this
mode permanent for the current process.
$BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE cannot be combined with this flag.
After the _WinAPI_SetSearchPathMode() function has been successfully called for the current process, the
setting in the system registry is ignored in favor of the mode most recently set successfully.
If the function has been successfully called for the current process with the $BASE_SEARCH_PATH_PERMANENT flag
set, safe mode is set permanently for the calling process. Any subsequent calls to _WinAPI_SetSearchPathMode()
from within that process that attempt to change the search mode will fail with ERROR_ACCESS_DENIED (5).
The _WinAPI_SetSearchPathMode() function does not modify the system registry.
This function requires Windows 7 or later.
Search SetSearchPathMode in MSDN Library.