Skip to content

Commit cd48447

Browse files
committed
cfengine-nova.wxs: sequence RemoveExistingProducts after InstallFinalize
Early placement deleted equal-versioned shared DLLs on upgrade, leaving cf-agent unable to load. Installing new files before removing the old product keeps them via refcounting. Ref: https://learn.microsoft.com/en-us/windows/win32/msi/removeexistingproducts-action Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
1 parent 4ee1901 commit cd48447

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎packaging/cfengine-nova/cfengine-nova.wxs‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,16 @@
264264
<!-- The sequence numbers are weird to avoid collisions with built-in numbers -->
265265

266266
<InstallExecuteSequence>
267-
<RemoveExistingProducts Sequence='1450' />
268267
<InstallInitialize Sequence='1500' />
269268
<Custom Action='GenerateKey' After='InstallFiles'>NOT Installed</Custom>
270269

271270
<InstallFinalize Sequence='6600' />
271+
272+
<!-- After InstallFinalize: install new files first, then remove the old
273+
product, so equal-versioned shared DLLs survive via refcounting. Early
274+
placement deletes them and breaks upgrades. Ref:
275+
https://learn.microsoft.com/en-us/windows/win32/msi/removeexistingproducts-action -->
276+
<RemoveExistingProducts Sequence='6700' />
272277
</InstallExecuteSequence>
273278

274279
</Product>

0 commit comments

Comments
 (0)