diff --git a/Docs/src/history.but b/Docs/src/history.but index b2052abd..f2cd13e1 100644 --- a/Docs/src/history.but +++ b/Docs/src/history.but @@ -324,6 +324,14 @@ Released on May 19th, 2013 \b Fixed Korean MUI_[UN]TEXT_FINISH_INFO_* (\W{http://sourceforge.net/support/tracker.php?aid=3541515}{bug #3541515}) +\H{v2.49} 2.49 + +Released on December 16th, 2015 + +\S1{v2.49-cl} Changelog + +\b Fixed CreateShortcut failure on Vista caused by security changes in 2.47 + \H{v2.48} 2.48 Released on December 10th, 2015 diff --git a/Source/exehead/Main.c b/Source/exehead/Main.c index 5f3dfee9..2c38f6c2 100644 --- a/Source/exehead/Main.c +++ b/Source/exehead/Main.c @@ -110,8 +110,14 @@ EXTERN_C void NSISWinMainNOCRT() // dynamically loaded modules (with relative paths) to just // %windir%\System32 and directories added with AddDllDirectory(). // This prevents DLL search order attacks (CAPEC-471). - FARPROC fp = myGetProcAddress(MGA_SetDefaultDllDirectories); - if (fp) ((BOOL(WINAPI*)(DWORD))fp)(LOAD_LIBRARY_SEARCH_SYSTEM32|LOAD_LIBRARY_SEARCH_USER_DIRS); + DWORD winver = GetVersion(); + // CoCreateInstance(CLSID_ShellLink, ...) fails on Vista if SetDefaultDllDirectories is called + BOOL avoidwinbug = LOWORD(winver) == MAKEWORD(6, 0); + if (!avoidwinbug) + { + FARPROC fp = myGetProcAddress(MGA_SetDefaultDllDirectories); + if (fp) ((BOOL(WINAPI*)(DWORD))fp)(LOAD_LIBRARY_SEARCH_SYSTEM32|LOAD_LIBRARY_SEARCH_USER_DIRS); + } } // Because myGetProcAddress now loads dlls with a full path