diff --git a/installer/installer_setup/main.cpp b/installer/installer_setup/main.cpp index 47c867684cc..570db650f96 100644 --- a/installer/installer_setup/main.cpp +++ b/installer/installer_setup/main.cpp @@ -223,6 +223,8 @@ void ShowWindow(HINSTANCE hInstance, int nCmdShow) { } int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow) { + SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_SYSTEM32); + LPWSTR* szArglist; int nArgs; szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs); @@ -238,7 +240,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow) { } LocalFree(szArglist); - SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_SYSTEM32); if (args == "") { ShowWindow(hInstance, nCmdShow); }