diff options
author | Bob Arnson <bob@firegiant.com> | 2022-01-15 21:40:54 -0500 |
---|---|---|
committer | Bob Arnson <github@bobs.org> | 2022-01-16 10:28:44 -0500 |
commit | 47bca2dc51525fcad86f325278b14953ac5b137e (patch) | |
tree | 80a153833efbe0794be7153c64e712a5799649c4 /src/burn/engine/elevation.cpp | |
parent | 6d1c4cc83214b65032251c67239b02da59a3e635 (diff) | |
download | wix-47bca2dc51525fcad86f325278b14953ac5b137e.tar.gz wix-47bca2dc51525fcad86f325278b14953ac5b137e.tar.bz2 wix-47bca2dc51525fcad86f325278b14953ac5b137e.zip |
Fix 32/64-bit bitness handling in Burn and BUtil.
- Take advantage of RegOpenEx.
- Always look for related bundles in both 32 and 64 hives.
- BundleEnumRelatedBundle requires caller to specify bitness.
Diffstat (limited to 'src/burn/engine/elevation.cpp')
-rw-r--r-- | src/burn/engine/elevation.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/burn/engine/elevation.cpp b/src/burn/engine/elevation.cpp index 355b4a34..221d8b6d 100644 --- a/src/burn/engine/elevation.cpp +++ b/src/burn/engine/elevation.cpp | |||
@@ -3299,7 +3299,6 @@ static HRESULT OnLaunchApprovedExe( | |||
3299 | SIZE_T iData = 0; | 3299 | SIZE_T iData = 0; |
3300 | BURN_LAUNCH_APPROVED_EXE* pLaunchApprovedExe = NULL; | 3300 | BURN_LAUNCH_APPROVED_EXE* pLaunchApprovedExe = NULL; |
3301 | BURN_APPROVED_EXE* pApprovedExe = NULL; | 3301 | BURN_APPROVED_EXE* pApprovedExe = NULL; |
3302 | REGSAM samDesired = KEY_QUERY_VALUE; | ||
3303 | HKEY hKey = NULL; | 3302 | HKEY hKey = NULL; |
3304 | DWORD dwProcessId = 0; | 3303 | DWORD dwProcessId = 0; |
3305 | BYTE* pbSendData = NULL; | 3304 | BYTE* pbSendData = NULL; |
@@ -3323,12 +3322,7 @@ static HRESULT OnLaunchApprovedExe( | |||
3323 | 3322 | ||
3324 | LogId(REPORT_STANDARD, MSG_LAUNCH_APPROVED_EXE_SEARCH, pApprovedExe->sczKey, pApprovedExe->sczValueName ? pApprovedExe->sczValueName : L"", pApprovedExe->fWin64 ? L"yes" : L"no"); | 3323 | LogId(REPORT_STANDARD, MSG_LAUNCH_APPROVED_EXE_SEARCH, pApprovedExe->sczKey, pApprovedExe->sczValueName ? pApprovedExe->sczValueName : L"", pApprovedExe->fWin64 ? L"yes" : L"no"); |
3325 | 3324 | ||
3326 | if (pApprovedExe->fWin64) | 3325 | hr = RegOpenEx(HKEY_LOCAL_MACHINE, pApprovedExe->sczKey, KEY_QUERY_VALUE, pApprovedExe->fWin64 ? REG_KEY_64BIT : REG_KEY_32BIT, &hKey); |
3327 | { | ||
3328 | samDesired |= KEY_WOW64_64KEY; | ||
3329 | } | ||
3330 | |||
3331 | hr = RegOpen(HKEY_LOCAL_MACHINE, pApprovedExe->sczKey, samDesired, &hKey); | ||
3332 | ExitOnFailure(hr, "Failed to open the registry key for the approved exe path."); | 3326 | ExitOnFailure(hr, "Failed to open the registry key for the approved exe path."); |
3333 | 3327 | ||
3334 | hr = RegReadString(hKey, pApprovedExe->sczValueName, &pLaunchApprovedExe->sczExecutablePath); | 3328 | hr = RegReadString(hKey, pApprovedExe->sczValueName, &pLaunchApprovedExe->sczExecutablePath); |