From 702b38fe565781f3bfc5b1d92a3404b535ace2a1 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Tue, 10 Feb 2026 20:33:03 -0500 Subject: Log detected package scope and lock bundle scope. - Fixes https://github.com/wixtoolset/issues/issues/9232 - Fixes https://github.com/wixtoolset/issues/issues/9240 --- src/burn/engine/plan.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/burn/engine/plan.cpp') diff --git a/src/burn/engine/plan.cpp b/src/burn/engine/plan.cpp index 6c46269b..889ad68c 100644 --- a/src/burn/engine/plan.cpp +++ b/src/burn/engine/plan.cpp @@ -342,7 +342,7 @@ extern "C" HRESULT PlanSetVariables( hr = VariableSetNumeric(pVariables, BURN_BUNDLE_ACTION, action, TRUE); ExitOnFailure(hr, "Failed to set the bundle action built-in variable."); - hr = VariableSetNumeric(pVariables, BURN_BUNDLE_SCOPE, authoredScope, TRUE); + hr = VariableSetNumeric(pVariables, BURN_BUNDLE_AUTHORED_SCOPE, authoredScope, TRUE); ExitOnFailure(hr, "Failed to set the bundle authored scope built-in variable."); hr = VariableSetNumeric(pVariables, BURN_BUNDLE_PLANNED_SCOPE, plannedScope, TRUE); @@ -826,6 +826,7 @@ extern "C" HRESULT PlanPackagesAndBundleScope( __in BOOTSTRAPPER_SCOPE scope, __in BOOTSTRAPPER_PACKAGE_SCOPE authoredScope, __in BOOTSTRAPPER_SCOPE commandLineScope, + __in BOOTSTRAPPER_SCOPE detectedScope, __out BOOTSTRAPPER_SCOPE* pResultingScope, __out BOOL* pfRegistrationPerMachine ) @@ -854,6 +855,13 @@ extern "C" HRESULT PlanPackagesAndBundleScope( } } + if (BOOTSTRAPPER_SCOPE_DEFAULT != detectedScope) + { + scope = detectedScope; + + LogId(REPORT_WARNING, MSG_PLAN_INSTALLED_SCOPE, LoggingBundleScopeToString(detectedScope)); + } + for (DWORD i = 0; i < cPackages; ++i) { BURN_PACKAGE* pPackage = rgPackages + i; -- cgit v1.2.3-55-g6feb