From 5a6c681b28c953d809292b4b85c80af300d7902f Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 5 Mar 2022 15:27:42 -0600 Subject: Ensure WixBundleInstalled and RebootPending are set in elevated engine. --- src/burn/engine/elevation.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/burn/engine/elevation.cpp') diff --git a/src/burn/engine/elevation.cpp b/src/burn/engine/elevation.cpp index d12a151a..e479b6c0 100644 --- a/src/burn/engine/elevation.cpp +++ b/src/burn/engine/elevation.cpp @@ -178,6 +178,7 @@ static HRESULT OnApplyInitialize( ); static HRESULT ElevatedProcessDetect( __in BURN_REGISTRATION* pRegistration, + __in BURN_VARIABLES* pVariables, __in BURN_PACKAGES* pPackages ); static HRESULT OnApplyUninitialize( @@ -2245,7 +2246,7 @@ static HRESULT OnApplyInitialize( ExitOnFailure(hr, "Failed to acquire lock due to setup in other session."); // Detect. - hr = ElevatedProcessDetect(pRegistration, pPackages); + hr = ElevatedProcessDetect(pRegistration, pVariables, pPackages); ExitOnFailure(hr, "Failed to run detection in elevated process."); // Attempt to pause AU with best effort. @@ -2331,6 +2332,7 @@ LExit: static HRESULT ElevatedProcessDetect( __in BURN_REGISTRATION* pRegistration, + __in BURN_VARIABLES* pVariables, __in BURN_PACKAGES* pPackages ) { @@ -2338,6 +2340,9 @@ static HRESULT ElevatedProcessDetect( DetectReset(pRegistration, pPackages); + hr = RegistrationSetDynamicVariables(pRegistration, pVariables); + ExitOnFailure(hr, "Failed to reset the dynamic registration variables during elevated detect."); + hr = RelatedBundlesInitializeForScope(TRUE, pRegistration, &pRegistration->relatedBundles); ExitOnFailure(hr, "Failed to initialize per-machine related bundles."); -- cgit v1.2.3-55-g6feb