summaryrefslogtreecommitdiffstats
path: root/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2022-03-04 00:50:42 (GMT)
committerGitHub <noreply@github.com>2022-03-04 00:50:42 (GMT)
commit8f31bf46980956c735dd18f9914f3e7144e87c77 (patch)
treef158d24d1cebaeb51af3433f2de125f3e05ebd4e /Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
parentec4a580f7cada002441ae5611b909d56e3b5b613 (diff)
downloadcpython-8f31bf46980956c735dd18f9914f3e7144e87c77.zip
cpython-8f31bf46980956c735dd18f9914f3e7144e87c77.tar.gz
cpython-8f31bf46980956c735dd18f9914f3e7144e87c77.tar.bz2
bpo-46744: Move Windows ARM64 installation directory to correct ProgramFiles (GH-31677)
Diffstat (limited to 'Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp')
-rw-r--r--Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
index 226416f..fdc2a21 100644
--- a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
+++ b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
@@ -1501,9 +1501,6 @@ private:
hr = UpdateUIStrings(_command.action);
BalExitOnFailure(hr, "Failed to load UI strings.");
- hr = FindProgramFilesArm();
- BalExitOnFailure(hr, "Fatal error locating Program Files (Arm)");
-
GetBundleFileVersion();
// don't fail if we couldn't get the version info; best-effort only
LExit:
@@ -2184,37 +2181,6 @@ private:
return hr;
}
- HRESULT FindProgramFilesArm() {
- wchar_t buffer[MAX_PATH + 1];
- DWORD bufferLen = MAX_PATH;
- LSTATUS res = RegGetValueW(
- HKEY_LOCAL_MACHINE,
- L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion",
- L"ProgramFilesDir (Arm)",
- RRF_RT_REG_SZ | RRF_RT_REG_EXPAND_SZ | RRF_SUBKEY_WOW6464KEY,
- NULL,
- buffer,
- &bufferLen
- );
- if (res != ERROR_SUCCESS) {
- // ProgramFilesArmFolder will default to ProgramFilesFolder. We only report
- // an error if the value existed, as it will simply just be absent on non-ARM
- // devices.
- if (res != ERROR_FILE_NOT_FOUND) {
- BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Failed to query 'ProgramFilesDir (Arm)': error code %d", res);
- }
- return S_OK;
- }
- if (buffer[0]) {
- wchar_t *p = &buffer[bufferLen / sizeof(wchar_t) - 1];
- while (*p == L'\\' || *p == L'\0') { p -= 1; }
- *++p = L'\\';
- *++p = L'\0';
- _engine->SetVariableString(L"ProgramFilesArmFolder", buffer);
- }
- return S_OK;
- }
-
//
// OnPlan - plan the detected changes.
//