@@ -2989,9 +2989,20 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
2989
2989
LOC_STRING *pLocString = nullptr ;
2990
2990
2991
2991
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" );
2994
2994
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
+ }
2995
3006
} else if (IsWindowsVersionOrGreater (6 , 1 , 0 )) {
2996
3007
BalLog (BOOTSTRAPPER_LOG_LEVEL_ERROR, " Detected Windows Server 2008 R2" );
2997
3008
BalLog (BOOTSTRAPPER_LOG_LEVEL_ERROR, " Service Pack 1 is required to continue installation" );
@@ -3009,9 +3020,20 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
3009
3020
LocGetString (_wixLoc, L" #(loc.FailureWS2K3OrEarlier)" , &pLocString);
3010
3021
}
3011
3022
} 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" );
3014
3025
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
+ }
3015
3037
} else if (IsWindows7OrGreater ()) {
3016
3038
BalLog (BOOTSTRAPPER_LOG_LEVEL_ERROR, " Detected Windows 7 RTM" );
3017
3039
BalLog (BOOTSTRAPPER_LOG_LEVEL_ERROR, " Service Pack 1 is required to continue installation" );
0 commit comments