diff options
| author | Bob Arnson <bob@firegiant.com> | 2026-04-01 16:06:45 -0400 |
|---|---|---|
| committer | Bob Arnson <github@bobs.org> | 2026-04-01 17:39:59 -0400 |
| commit | cb06f75799d845eeb78d326d4b1295921acd0bad (patch) | |
| tree | 65891cf4579cc0f530c4615c87439d0e9dc502f9 /src/burn/engine/relatedbundle.cpp | |
| parent | b4da272e25c5c776cc5c66ee069bd3fb7548dd92 (diff) | |
| download | wix-cb06f75799d845eeb78d326d4b1295921acd0bad.tar.gz wix-cb06f75799d845eeb78d326d4b1295921acd0bad.tar.bz2 wix-cb06f75799d845eeb78d326d4b1295921acd0bad.zip | |
Handle lack of scope for pre-v7 bundles.
Fixes https://github.com/wixtoolset/issues/issues/9274
Diffstat (limited to 'src/burn/engine/relatedbundle.cpp')
| -rw-r--r-- | src/burn/engine/relatedbundle.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/burn/engine/relatedbundle.cpp b/src/burn/engine/relatedbundle.cpp index 166c4ae8..2d95111f 100644 --- a/src/burn/engine/relatedbundle.cpp +++ b/src/burn/engine/relatedbundle.cpp | |||
| @@ -356,10 +356,19 @@ static HRESULT LoadRelatedBundleFromKey( | |||
| 356 | LogId(REPORT_WARNING, MSG_RELATED_PACKAGE_INVALID_VERSION, wzRelatedBundleCode, sczBundleVersion); | 356 | LogId(REPORT_WARNING, MSG_RELATED_PACKAGE_INVALID_VERSION, wzRelatedBundleCode, sczBundleVersion); |
| 357 | } | 357 | } |
| 358 | 358 | ||
| 359 | // Look for v7+ scope registration. | ||
| 359 | hr = RegReadNumber(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_SCOPE, &dwScope); | 360 | hr = RegReadNumber(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_SCOPE, &dwScope); |
| 360 | ExitOnFailure(hr, "Failed to read registration %ls for bundle %ls.", wzRelatedBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_SCOPE); | 361 | if (SUCCEEDED(hr)) |
| 362 | { | ||
| 363 | pRelatedBundle->detectedScope = static_cast<BOOTSTRAPPER_SCOPE>(dwScope); | ||
| 364 | } | ||
| 365 | else if (E_FILENOTFOUND == hr) | ||
| 366 | { | ||
| 367 | hr = S_OK; | ||
| 361 | 368 | ||
| 362 | pRelatedBundle->detectedScope = static_cast<BOOTSTRAPPER_SCOPE>(dwScope); | 369 | pRelatedBundle->detectedScope = fPerMachine ? BOOTSTRAPPER_SCOPE_PER_MACHINE : BOOTSTRAPPER_SCOPE_PER_USER; |
| 370 | } | ||
| 371 | ExitOnFailure(hr, "Failed to read registration %ls for bundle %ls.", wzRelatedBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_SCOPE); | ||
| 363 | 372 | ||
| 364 | hr = RegReadString(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH, &sczCachePath); | 373 | hr = RegReadString(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH, &sczCachePath); |
| 365 | ExitOnFailure(hr, "Failed to read cache path from registry for bundle: %ls", wzRelatedBundleCode); | 374 | ExitOnFailure(hr, "Failed to read cache path from registry for bundle: %ls", wzRelatedBundleCode); |
