From 6644974538985634c2ecc97474d77240e4bea3e4 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Thu, 20 Mar 2025 21:14:12 -0400 Subject: Update registration disappears during upgrade. Update registration is stored in a shared registry key that Burn takes care to keep around across upgrades. The approach it used broke between WiX v3 and WiX v5. This change makes it work again by writing update registration when the session ends. --- src/burn/engine/registration.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/burn/engine/registration.cpp') diff --git a/src/burn/engine/registration.cpp b/src/burn/engine/registration.cpp index 85c006f7..966fc849 100644 --- a/src/burn/engine/registration.cpp +++ b/src/burn/engine/registration.cpp @@ -808,13 +808,6 @@ extern "C" HRESULT RegistrationSessionBegin( ExitOnFailure(hr, "Failed to write software tags."); } - // Update registration. - if (pRegistration->update.fRegisterUpdate) - { - hr = WriteUpdateRegistration(pRegistration, pVariables); - ExitOnFailure(hr, "Failed to write update registration."); - } - // Only set install date and initial estimated size here for the first time. // Estimated size will always get updated at the end of the session. if (fCreated) @@ -904,6 +897,13 @@ extern "C" HRESULT RegistrationSessionEnd( hr = UpdateEstimatedSize(hkRegistration, qwEstimatedSize); ExitOnFailure(hr, "Failed to update estimated size."); + + // Update registration. + if (pRegistration->update.fRegisterUpdate) + { + hr = WriteUpdateRegistration(pRegistration, pVariables); + ExitOnFailure(hr, "Failed to write update registration."); + } } // Update resume mode. -- cgit v1.2.3-55-g6feb