summaryrefslogtreecommitdiff
path: root/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2015-10-11 18:05:11 -0700
committerSteve Dower <steve.dower@microsoft.com>2015-10-11 18:05:11 -0700
commit8ffe4fdeb0a818cc3e8d462a9bdf3071137d4c09 (patch)
tree8f8a68b397e76f59811aaed46e27d54982e50928 /Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
parentb96698112d69ac34f294aa2a7699966e53f826a1 (diff)
downloadcpython-git-8ffe4fdeb0a818cc3e8d462a9bdf3071137d4c09.tar.gz
Only detects features from previous version when a bundle is found.
Otherwise, stray registry entries would cause issues. Also fixes an accelerator collision and improves UAC icons when upgrading.
Diffstat (limited to 'Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp')
-rw-r--r--Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
index 71868a6ce6..9d94e3b46f 100644
--- a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
+++ b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
@@ -674,6 +674,8 @@ public: // IBootstrapperApplication
hr
);
}
+
+ LoadOptionalFeatureStates(_engine);
} else if (BOOTSTRAPPER_RELATED_OPERATION_NONE == operation) {
if (_command.action == BOOTSTRAPPER_ACTION_INSTALL) {
LOC_STRING *pLocString = nullptr;
@@ -2556,7 +2558,14 @@ private:
BOOL WillElevate() {
static BAL_CONDITION WILL_ELEVATE_CONDITION = {
- L"not WixBundleElevated and (InstallAllUsers or (InstallLauncherAllUsers and Include_launcher))",
+ L"not WixBundleElevated and ("
+ /*Elevate when installing for all users*/
+ L"InstallAllUsers or"
+ /*Elevate when installing the launcher for all users and it was not detected*/
+ L"(InstallLauncherAllUsers and Include_launcher and not DetectedLauncher) or"
+ /*Elevate when the launcher was installed for all users and it is being removed*/
+ L"(DetectedLauncher and DetectedLauncherAllUsers and not Include_launcher)"
+ L")",
L""
};
BOOL result;
@@ -2884,6 +2893,10 @@ private:
pEngine->SetVariableNumeric(L"Include_launcher", 0);
} else if (res == ERROR_SUCCESS) {
pEngine->SetVariableNumeric(L"Include_launcher", 1);
+ pEngine->SetVariableNumeric(L"DetectedLauncher", 1);
+ pEngine->SetVariableNumeric(L"InstallLauncherAllUsers", (hkHive == HKEY_LOCAL_MACHINE) ? 1 : 0);
+ pEngine->SetVariableNumeric(L"DetectedLauncherAllUsers", (hkHive == HKEY_LOCAL_MACHINE) ? 1 : 0);
+ pEngine->SetVariableString(L"InstallLauncherAllUsersState", L"disable");
}
res = RegQueryValueExW(hKey, L"AssociateFiles", nullptr, nullptr, nullptr, nullptr);
@@ -3101,7 +3114,6 @@ public:
_hBAFModule = nullptr;
_baFunction = nullptr;
- LoadOptionalFeatureStates(pEngine);
EnsureTargetDir();
}