SetDefaultDllDirectories is only supported on windows 8

This commit is contained in:
Caelan Sayler
2022-09-04 14:21:36 +01:00
parent 0a5d62aa89
commit 29fa103f30

View File

@@ -11,11 +11,6 @@ using namespace std;
int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ PWSTR pCmdLine, _In_ int nCmdShow)
{
// https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-security
SetSearchPathMode(BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE | BASE_SEARCH_PATH_PERMANENT);
SetDllDirectory(L"");
SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_SYSTEM32);
// squirrel supports Win7 with ESU Y3, but we can't detect ESU easily.
if (!IsWindows7SP1OrGreater()) {
util::show_error_dialog(L"This installer requires Windows 7 SP1 or later and cannot run.");