@@ -2989,9 +2989,20 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
29892989 LOC_STRING *pLocString = nullptr ;
29902990
29912991 if (IsWindowsServer ()) {
2992- if (IsWindowsVersionOrGreater (6 , 1 , 1 )) {
2993- BalLog (BOOTSTRAPPER_LOG_LEVEL_STANDARD, " Target OS is Windows Server 2008 R2 or later" );
2992+ if (IsWindowsVersionOrGreater (6 , 2 , 0 )) {
2993+ BalLog (BOOTSTRAPPER_LOG_LEVEL_STANDARD, " Target OS is Windows Server 2012 or later" );
29942994 return ;
2995+ } else if (IsWindowsVersionOrGreater (6 , 1 , 1 )) {
2996+ HMODULE hKernel32 = GetModuleHandleW (L" kernel32" );
2997+ if (hKernel32 && !GetProcAddress (hKernel32, " AddDllDirectory" )) {
2998+ BalLog (BOOTSTRAPPER_LOG_LEVEL_ERROR, " Detected Windows Server 2008 R2 without KB2533625" );
2999+ BalLog (BOOTSTRAPPER_LOG_LEVEL_ERROR, " KB2533625 update is required to continue." );
3000+ /* The "MissingSP1" error also specifies updates are required */
3001+ LocGetString (_wixLoc, L" #(loc.FailureWS2K8R2MissingSP1)" , &pLocString);
3002+ } else {
3003+ BalLog (BOOTSTRAPPER_LOG_LEVEL_STANDARD, " Target OS is Windows Server 2008 R2 or later" );
3004+ return ;
3005+ }
29953006 } else if (IsWindowsVersionOrGreater (6 , 1 , 0 )) {
29963007 BalLog (BOOTSTRAPPER_LOG_LEVEL_ERROR, " Detected Windows Server 2008 R2" );
29973008 BalLog (BOOTSTRAPPER_LOG_LEVEL_ERROR, " Service Pack 1 is required to continue installation" );
@@ -3009,9 +3020,20 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
30093020 LocGetString (_wixLoc, L" #(loc.FailureWS2K3OrEarlier)" , &pLocString);
30103021 }
30113022 } else {
3012- if (IsWindows7SP1OrGreater ()) {
3013- BalLog (BOOTSTRAPPER_LOG_LEVEL_STANDARD, " Target OS is Windows 7 SP1 or later" );
3023+ if (IsWindows8OrGreater ()) {
3024+ BalLog (BOOTSTRAPPER_LOG_LEVEL_STANDARD, " Target OS is Windows 8 or later" );
30143025 return ;
3026+ } else if (IsWindows7SP1OrGreater ()) {
3027+ HMODULE hKernel32 = GetModuleHandleW (L" kernel32" );
3028+ if (hKernel32 && !GetProcAddress (hKernel32, " AddDllDirectory" )) {
3029+ BalLog (BOOTSTRAPPER_LOG_LEVEL_ERROR, " Detected Windows 7 SP1 without KB2533625" );
3030+ BalLog (BOOTSTRAPPER_LOG_LEVEL_ERROR, " KB2533625 update is required to continue." );
3031+ /* The "MissingSP1" error also specifies updates are required */
3032+ LocGetString (_wixLoc, L" #(loc.FailureWin7MissingSP1)" , &pLocString);
3033+ } else {
3034+ BalLog (BOOTSTRAPPER_LOG_LEVEL_STANDARD, " Target OS is Windows 7 SP1 or later" );
3035+ return ;
3036+ }
30153037 } else if (IsWindows7OrGreater ()) {
30163038 BalLog (BOOTSTRAPPER_LOG_LEVEL_ERROR, " Detected Windows 7 RTM" );
30173039 BalLog (BOOTSTRAPPER_LOG_LEVEL_ERROR, " Service Pack 1 is required to continue installation" );
0 commit comments