diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2022-09-14 11:02:20 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2022-09-14 12:22:45 -0500 |
| commit | ca3bf7968865be1cb80e9d63e7cc177f92469e2f (patch) | |
| tree | 4e55d5fa999fc12180ed80ca5b9ba55eb12dc07b /src | |
| parent | 5059f83d7dccd7221458fca414a0756bb83466a5 (diff) | |
| download | wix-ca3bf7968865be1cb80e9d63e7cc177f92469e2f.tar.gz wix-ca3bf7968865be1cb80e9d63e7cc177f92469e2f.tar.bz2 wix-ca3bf7968865be1cb80e9d63e7cc177f92469e2f.zip | |
Don't search for 64-bit bundles on 32-bit OS.
Fixes 6849
Diffstat (limited to 'src')
| -rw-r--r-- | src/libs/dutil/WixToolset.DUtil/butil.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/butil.cpp b/src/libs/dutil/WixToolset.DUtil/butil.cpp index 47f206ea..4b6cd02a 100644 --- a/src/libs/dutil/WixToolset.DUtil/butil.cpp +++ b/src/libs/dutil/WixToolset.DUtil/butil.cpp | |||
| @@ -361,6 +361,12 @@ DAPI_(HRESULT) BundleQueryRelatedBundles( | |||
| 361 | { | 361 | { |
| 362 | HRESULT hr = S_OK; | 362 | HRESULT hr = S_OK; |
| 363 | BUNDLE_QUERY_CONTEXT queryContext = { }; | 363 | BUNDLE_QUERY_CONTEXT queryContext = { }; |
| 364 | BOOL fSearch64 = TRUE; | ||
| 365 | |||
| 366 | #if !defined(_WIN64) | ||
| 367 | // On 32-bit OS's, the requested bitness of the key is ignored so need to avoid searching the same place twice. | ||
| 368 | ProcWow64(::GetCurrentProcess(), &fSearch64); | ||
| 369 | #endif | ||
| 364 | 370 | ||
| 365 | queryContext.installContext = installContext; | 371 | queryContext.installContext = installContext; |
| 366 | queryContext.rgwzDetectCodes = rgwzDetectCodes; | 372 | queryContext.rgwzDetectCodes = rgwzDetectCodes; |
| @@ -379,10 +385,13 @@ DAPI_(HRESULT) BundleQueryRelatedBundles( | |||
| 379 | hr = QueryRelatedBundlesForScopeAndBitness(&queryContext); | 385 | hr = QueryRelatedBundlesForScopeAndBitness(&queryContext); |
| 380 | ButilExitOnFailure(hr, "Failed to query 32-bit related bundles."); | 386 | ButilExitOnFailure(hr, "Failed to query 32-bit related bundles."); |
| 381 | 387 | ||
| 382 | queryContext.regBitness = REG_KEY_64BIT; | 388 | if (fSearch64) |
| 389 | { | ||
| 390 | queryContext.regBitness = REG_KEY_64BIT; | ||
| 383 | 391 | ||
| 384 | hr = QueryRelatedBundlesForScopeAndBitness(&queryContext); | 392 | hr = QueryRelatedBundlesForScopeAndBitness(&queryContext); |
| 385 | ButilExitOnFailure(hr, "Failed to query 64-bit related bundles."); | 393 | ButilExitOnFailure(hr, "Failed to query 64-bit related bundles."); |
| 394 | } | ||
| 386 | 395 | ||
| 387 | LExit: | 396 | LExit: |
| 388 | return hr; | 397 | return hr; |
