aboutsummaryrefslogtreecommitdiff
path: root/src/burn/engine/registration.cpp
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2025-03-20 21:14:12 -0400
committerRob Mensching <rob@firegiant.com>2025-05-28 16:47:37 -0700
commit6644974538985634c2ecc97474d77240e4bea3e4 (patch)
treedaccb90d84f5b2f4b5b276cd3146209e26dd56e9 /src/burn/engine/registration.cpp
parent67f9ee7891738bf78b34315d6c9ca259da8d215d (diff)
downloadwix-6644974538985634c2ecc97474d77240e4bea3e4.tar.gz
wix-6644974538985634c2ecc97474d77240e4bea3e4.tar.bz2
wix-6644974538985634c2ecc97474d77240e4bea3e4.zip
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.
Diffstat (limited to 'src/burn/engine/registration.cpp')
-rw-r--r--src/burn/engine/registration.cpp14
1 files changed, 7 insertions, 7 deletions
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(
808 ExitOnFailure(hr, "Failed to write software tags."); 808 ExitOnFailure(hr, "Failed to write software tags.");
809 } 809 }
810 810
811 // Update registration.
812 if (pRegistration->update.fRegisterUpdate)
813 {
814 hr = WriteUpdateRegistration(pRegistration, pVariables);
815 ExitOnFailure(hr, "Failed to write update registration.");
816 }
817
818 // Only set install date and initial estimated size here for the first time. 811 // Only set install date and initial estimated size here for the first time.
819 // Estimated size will always get updated at the end of the session. 812 // Estimated size will always get updated at the end of the session.
820 if (fCreated) 813 if (fCreated)
@@ -904,6 +897,13 @@ extern "C" HRESULT RegistrationSessionEnd(
904 897
905 hr = UpdateEstimatedSize(hkRegistration, qwEstimatedSize); 898 hr = UpdateEstimatedSize(hkRegistration, qwEstimatedSize);
906 ExitOnFailure(hr, "Failed to update estimated size."); 899 ExitOnFailure(hr, "Failed to update estimated size.");
900
901 // Update registration.
902 if (pRegistration->update.fRegisterUpdate)
903 {
904 hr = WriteUpdateRegistration(pRegistration, pVariables);
905 ExitOnFailure(hr, "Failed to write update registration.");
906 }
907 } 907 }
908 908
909 // Update resume mode. 909 // Update resume mode.