aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-09-09 11:44:26 -0700
committerSteve Dower <steve.dower@microsoft.com>2016-09-09 11:44:26 -0700
commit7a35b1c2a70b0fbe4acdd62568f1158ed033df51 (patch)
tree72d6c5017be5a50fc9b0b0e1c2069141ceb58598 /Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
parenta845a81e427402cff449d4d31434ffd7230d0beb (diff)
parent2fadfc0ead279238b53f3250fa046c888473a056 (diff)
downloadcpython-7a35b1c2a70b0fbe4acdd62568f1158ed033df51.tar.gz
cpython-7a35b1c2a70b0fbe4acdd62568f1158ed033df51.zip
Issue #26619: Improves error message when installing on out-of-date Windows Server
Diffstat (limited to 'Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp')
-rw-r--r--Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp58
1 files changed, 40 insertions, 18 deletions
diff --git a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
index 3b83eac8d11..67726d6e173 100644
--- a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
+++ b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
@@ -3017,24 +3017,46 @@ private:
void ValidateOperatingSystem() {
LOC_STRING *pLocString = nullptr;
- if (IsWindows7SP1OrGreater()) {
- BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Target OS is Windows 7 SP1 or later");
- return;
- } else if (IsWindows7OrGreater()) {
- BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 7 RTM");
- BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 1 is required to continue installation");
- LocGetString(_wixLoc, L"#(loc.FailureWin7MissingSP1)", &pLocString);
- } else if (IsWindowsVistaSP2OrGreater()) {
- BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Target OS is Windows Vista SP2");
- return;
- } else if (IsWindowsVistaOrGreater()) {
- BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Vista RTM or SP1");
- BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 2 is required to continue installation");
- LocGetString(_wixLoc, L"#(loc.FailureVistaMissingSP2)", &pLocString);
- } else {
- BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows XP or earlier");
- BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Windows Vista SP2 or later is required to continue installation");
- LocGetString(_wixLoc, L"#(loc.FailureXPOrEarlier)", &pLocString);
+ if (IsWindowsServer()) {
+ if (IsWindowsVersionOrGreater(6, 1, 1)) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows Server 2008 R2 or later");
+ return;
+ } else if (IsWindowsVersionOrGreater(6, 1, 0)) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2008 R2");
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 1 is required to continue installation");
+ LocGetString(_wixLoc, L"#(loc.FailureWS2K8R2MissingSP1)", &pLocString);
+ } else if (IsWindowsVersionOrGreater(6, 0, 2)) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Target OS is Windows Server 2008 SP2 or later");
+ return;
+ } else if (IsWindowsVersionOrGreater(6, 0, 0)) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2008");
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 2 is required to continue installation");
+ LocGetString(_wixLoc, L"#(loc.FailureWS2K8MissingSP2)", &pLocString);
+ } else {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2003 or earlier");
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Windows Server 2008 SP2 or later is required to continue installation");
+ LocGetString(_wixLoc, L"#(loc.FailureWS2K3OrEarlier)", &pLocString);
+ }
+ } else {
+ if (IsWindows7SP1OrGreater()) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 7 SP1 or later");
+ return;
+ } else if (IsWindows7OrGreater()) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 7 RTM");
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 1 is required to continue installation");
+ LocGetString(_wixLoc, L"#(loc.FailureWin7MissingSP1)", &pLocString);
+ } else if (IsWindowsVistaSP2OrGreater()) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Target OS is Windows Vista SP2");
+ return;
+ } else if (IsWindowsVistaOrGreater()) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Vista RTM or SP1");
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 2 is required to continue installation");
+ LocGetString(_wixLoc, L"#(loc.FailureVistaMissingSP2)", &pLocString);
+ } else {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows XP or earlier");
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Windows Vista SP2 or later is required to continue installation");
+ LocGetString(_wixLoc, L"#(loc.FailureXPOrEarlier)", &pLocString);
+ }
}
if (pLocString && pLocString->wzText) {