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
committerBob Arnson <bob@firegiant.com>2025-03-24 18:18:52 -0400
commitf3fb208959d5ef2f8df19f518224d413b233f751 (patch)
tree0ef9b5f2e59edb2f25ad0040a1bfa293155c309c /src/burn/engine/registration.cpp
parentbf13a0b67dd644eb7d74cb0cfb6876840f73d82b (diff)
downloadwix-bob/UpdateRegistrationAcrossUpgrades.tar.gz
wix-bob/UpdateRegistrationAcrossUpgrades.tar.bz2
wix-bob/UpdateRegistrationAcrossUpgrades.zip
Update registration disappears during upgrade.bob/UpdateRegistrationAcrossUpgrades
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.