aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-04-04 14:43:06 -0500
committerSean Hall <r.sean.hall@gmail.com>2022-04-05 13:52:11 -0500
commit44c2ca035c1a5d52a6b3299ba3abbb8b88f7f1c0 (patch)
tree0414e7d41d2f1389b1007984dd3df50cb4dba88e
parent5ac804d68360fc8a2f66ec020e1fe2536792f179 (diff)
downloadwix-44c2ca035c1a5d52a6b3299ba3abbb8b88f7f1c0.tar.gz
wix-44c2ca035c1a5d52a6b3299ba3abbb8b88f7f1c0.tar.bz2
wix-44c2ca035c1a5d52a6b3299ba3abbb8b88f7f1c0.zip
Move the logic of a bundle registering as a system component into Burn.
-rw-r--r--src/burn/engine/registration.cpp17
-rw-r--r--src/burn/engine/registration.h3
-rw-r--r--src/burn/test/BurnUnitTest/PlanTest.cpp22
-rw-r--r--src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs9
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs2
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/BundlePackageFixture.cs4
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs2
7 files changed, 40 insertions, 19 deletions
diff --git a/src/burn/engine/registration.cpp b/src/burn/engine/registration.cpp
index 7b6aa6bb..961e86bc 100644
--- a/src/burn/engine/registration.cpp
+++ b/src/burn/engine/registration.cpp
@@ -169,10 +169,6 @@ extern "C" HRESULT RegistrationParseFromXml(
169 169
170 if (fFoundXml) 170 if (fFoundXml)
171 { 171 {
172 // @Register
173 hr = XmlGetYesNoAttribute(pixnArpNode, L"Register", &pRegistration->fRegisterArp);
174 ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Register.");
175
176 // @DisplayName 172 // @DisplayName
177 hr = XmlGetAttributeEx(pixnArpNode, L"DisplayName", &pRegistration->sczDisplayName); 173 hr = XmlGetAttributeEx(pixnArpNode, L"DisplayName", &pRegistration->sczDisplayName);
178 ExitOnOptionalXmlQueryFailure(hr, fFoundXml, "Failed to get @DisplayName."); 174 ExitOnOptionalXmlQueryFailure(hr, fFoundXml, "Failed to get @DisplayName.");
@@ -247,7 +243,12 @@ extern "C" HRESULT RegistrationParseFromXml(
247 243
248 // @DisableRemove 244 // @DisableRemove
249 hr = XmlGetYesNoAttribute(pixnArpNode, L"DisableRemove", &pRegistration->fNoRemove); 245 hr = XmlGetYesNoAttribute(pixnArpNode, L"DisableRemove", &pRegistration->fNoRemove);
250 ExitOnOptionalXmlQueryFailure(hr, pRegistration->fNoRemoveDefined, "Failed to get @DisableRemove."); 246 ExitOnOptionalXmlQueryFailure(hr, fFoundXml, "Failed to get @DisableRemove.");
247 }
248
249 if (pRegistration->fNoRemove && BURN_REGISTRATION_MODIFY_ENABLED != pRegistration->modify)
250 {
251 pRegistration->fForceSystemComponent = TRUE;
251 } 252 }
252 253
253 hr = ParseSoftwareTagsFromXml(pixnRegistrationNode, &pRegistration->softwareTags.rgSoftwareTags, &pRegistration->softwareTags.cSoftwareTags); 254 hr = ParseSoftwareTagsFromXml(pixnRegistrationNode, &pRegistration->softwareTags.rgSoftwareTags, &pRegistration->softwareTags.cSoftwareTags);
@@ -759,14 +760,14 @@ extern "C" HRESULT RegistrationSessionBegin(
759 } 760 }
760 761
761 // NoRemove: should this be allowed? 762 // NoRemove: should this be allowed?
762 if (pRegistration->fNoRemoveDefined) 763 if (pRegistration->fNoRemove)
763 { 764 {
764 hr = RegWriteNumber(hkRegistration, REGISTRY_BUNDLE_NO_REMOVE, (DWORD)pRegistration->fNoRemove); 765 hr = RegWriteNumber(hkRegistration, REGISTRY_BUNDLE_NO_REMOVE, 1);
765 ExitOnFailure(hr, "Failed to write %ls value.", REGISTRY_BUNDLE_NO_REMOVE); 766 ExitOnFailure(hr, "Failed to write %ls value.", REGISTRY_BUNDLE_NO_REMOVE);
766 } 767 }
767 768
768 // Conditionally hide the ARP entry. 769 // Conditionally hide the ARP entry.
769 if (!pRegistration->fRegisterArp) 770 if (pRegistration->fForceSystemComponent)
770 { 771 {
771 hr = RegWriteNumber(hkRegistration, REGISTRY_BUNDLE_SYSTEM_COMPONENT, 1); 772 hr = RegWriteNumber(hkRegistration, REGISTRY_BUNDLE_SYSTEM_COMPONENT, 1);
772 ExitOnFailure(hr, "Failed to write %ls value.", REGISTRY_BUNDLE_SYSTEM_COMPONENT); 773 ExitOnFailure(hr, "Failed to write %ls value.", REGISTRY_BUNDLE_SYSTEM_COMPONENT);
diff --git a/src/burn/engine/registration.h b/src/burn/engine/registration.h
index 58c883da..c07be962 100644
--- a/src/burn/engine/registration.h
+++ b/src/burn/engine/registration.h
@@ -95,7 +95,7 @@ typedef struct _BURN_SOFTWARE_TAGS
95typedef struct _BURN_REGISTRATION 95typedef struct _BURN_REGISTRATION
96{ 96{
97 BOOL fPerMachine; 97 BOOL fPerMachine;
98 BOOL fRegisterArp; 98 BOOL fForceSystemComponent;
99 BOOL fDisableResume; 99 BOOL fDisableResume;
100 BOOL fCached; 100 BOOL fCached;
101 BOOTSTRAPPER_REGISTRATION_TYPE detectedRegistrationType; 101 BOOTSTRAPPER_REGISTRATION_TYPE detectedRegistrationType;
@@ -140,7 +140,6 @@ typedef struct _BURN_REGISTRATION
140 LPWSTR sczContact; 140 LPWSTR sczContact;
141 //DWORD64 qwEstimatedSize; // TODO: size should come from disk cost calculation 141 //DWORD64 qwEstimatedSize; // TODO: size should come from disk cost calculation
142 BURN_REGISTRATION_MODIFY_TYPE modify; 142 BURN_REGISTRATION_MODIFY_TYPE modify;
143 BOOL fNoRemoveDefined;
144 BOOL fNoRemove; 143 BOOL fNoRemove;
145 144
146 BURN_SOFTWARE_TAGS softwareTags; 145 BURN_SOFTWARE_TAGS softwareTags;
diff --git a/src/burn/test/BurnUnitTest/PlanTest.cpp b/src/burn/test/BurnUnitTest/PlanTest.cpp
index fcba0f1a..26e7dfd2 100644
--- a/src/burn/test/BurnUnitTest/PlanTest.cpp
+++ b/src/burn/test/BurnUnitTest/PlanTest.cpp
@@ -71,6 +71,7 @@ namespace Bootstrapper
71 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 71 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
72 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 72 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
73 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 73 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
74 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
74 75
75 BOOL fRollback = FALSE; 76 BOOL fRollback = FALSE;
76 DWORD dwIndex = 0; 77 DWORD dwIndex = 0;
@@ -231,6 +232,7 @@ namespace Bootstrapper
231 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 232 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
232 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 233 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
233 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 234 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
235 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
234 236
235 BOOL fRollback = FALSE; 237 BOOL fRollback = FALSE;
236 DWORD dwIndex = 0; 238 DWORD dwIndex = 0;
@@ -364,6 +366,7 @@ namespace Bootstrapper
364 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 366 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
365 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 367 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
366 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 368 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
369 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
367 370
368 BOOL fRollback = FALSE; 371 BOOL fRollback = FALSE;
369 DWORD dwIndex = 0; 372 DWORD dwIndex = 0;
@@ -479,6 +482,7 @@ namespace Bootstrapper
479 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 482 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
480 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 483 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
481 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 484 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
485 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
482 486
483 BOOL fRollback = FALSE; 487 BOOL fRollback = FALSE;
484 DWORD dwIndex = 0; 488 DWORD dwIndex = 0;
@@ -579,6 +583,7 @@ namespace Bootstrapper
579 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 583 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
580 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 584 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
581 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 585 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
586 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
582 587
583 BOOL fRollback = FALSE; 588 BOOL fRollback = FALSE;
584 DWORD dwIndex = 0; 589 DWORD dwIndex = 0;
@@ -698,6 +703,7 @@ namespace Bootstrapper
698 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 703 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
699 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 704 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
700 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 705 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
706 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
701 707
702 BOOL fRollback = FALSE; 708 BOOL fRollback = FALSE;
703 DWORD dwIndex = 0; 709 DWORD dwIndex = 0;
@@ -800,6 +806,7 @@ namespace Bootstrapper
800 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 806 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
801 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 807 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
802 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 808 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
809 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
803 810
804 BOOL fRollback = FALSE; 811 BOOL fRollback = FALSE;
805 DWORD dwIndex = 0; 812 DWORD dwIndex = 0;
@@ -894,6 +901,7 @@ namespace Bootstrapper
894 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 901 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
895 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 902 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
896 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 903 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
904 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
897 905
898 BOOL fRollback = FALSE; 906 BOOL fRollback = FALSE;
899 DWORD dwIndex = 0; 907 DWORD dwIndex = 0;
@@ -983,6 +991,7 @@ namespace Bootstrapper
983 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 991 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
984 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 992 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
985 Assert::Equal<BOOL>(TRUE, pPlan->fDowngrade); 993 Assert::Equal<BOOL>(TRUE, pPlan->fDowngrade);
994 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_NONE, pPlan->dwRegistrationOperations);
986 995
987 BOOL fRollback = FALSE; 996 BOOL fRollback = FALSE;
988 DWORD dwIndex = 0; 997 DWORD dwIndex = 0;
@@ -1058,6 +1067,7 @@ namespace Bootstrapper
1058 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 1067 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
1059 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 1068 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
1060 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 1069 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
1070 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
1061 1071
1062 BOOL fRollback = FALSE; 1072 BOOL fRollback = FALSE;
1063 DWORD dwIndex = 0; 1073 DWORD dwIndex = 0;
@@ -1147,6 +1157,7 @@ namespace Bootstrapper
1147 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 1157 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
1148 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 1158 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
1149 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 1159 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
1160 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
1150 1161
1151 BOOL fRollback = FALSE; 1162 BOOL fRollback = FALSE;
1152 DWORD dwIndex = 0; 1163 DWORD dwIndex = 0;
@@ -1238,6 +1249,7 @@ namespace Bootstrapper
1238 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 1249 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
1239 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 1250 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
1240 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 1251 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
1252 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
1241 1253
1242 BOOL fRollback = FALSE; 1254 BOOL fRollback = FALSE;
1243 DWORD dwIndex = 0; 1255 DWORD dwIndex = 0;
@@ -1344,6 +1356,7 @@ namespace Bootstrapper
1344 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 1356 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
1345 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 1357 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
1346 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 1358 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
1359 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
1347 1360
1348 BOOL fRollback = FALSE; 1361 BOOL fRollback = FALSE;
1349 DWORD dwIndex = 0; 1362 DWORD dwIndex = 0;
@@ -1423,6 +1436,7 @@ namespace Bootstrapper
1423 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 1436 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
1424 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 1437 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
1425 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 1438 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
1439 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
1426 1440
1427 BOOL fRollback = FALSE; 1441 BOOL fRollback = FALSE;
1428 DWORD dwIndex = 0; 1442 DWORD dwIndex = 0;
@@ -1518,6 +1532,7 @@ namespace Bootstrapper
1518 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 1532 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
1519 Assert::Equal<BOOL>(TRUE, pPlan->fDisallowRemoval); 1533 Assert::Equal<BOOL>(TRUE, pPlan->fDisallowRemoval);
1520 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 1534 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
1535 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
1521 1536
1522 BOOL fRollback = FALSE; 1537 BOOL fRollback = FALSE;
1523 DWORD dwIndex = 0; 1538 DWORD dwIndex = 0;
@@ -1588,6 +1603,7 @@ namespace Bootstrapper
1588 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 1603 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
1589 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 1604 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
1590 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 1605 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
1606 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
1591 1607
1592 BOOL fRollback = FALSE; 1608 BOOL fRollback = FALSE;
1593 DWORD dwIndex = 0; 1609 DWORD dwIndex = 0;
@@ -1672,6 +1688,7 @@ namespace Bootstrapper
1672 Assert::Equal<BOOL>(TRUE, pPlan->fDisableRollback); 1688 Assert::Equal<BOOL>(TRUE, pPlan->fDisableRollback);
1673 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 1689 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
1674 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 1690 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
1691 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
1675 1692
1676 BOOL fRollback = FALSE; 1693 BOOL fRollback = FALSE;
1677 DWORD dwIndex = 0; 1694 DWORD dwIndex = 0;
@@ -1767,6 +1784,7 @@ namespace Bootstrapper
1767 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 1784 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
1768 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 1785 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
1769 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 1786 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
1787 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
1770 1788
1771 BOOL fRollback = FALSE; 1789 BOOL fRollback = FALSE;
1772 DWORD dwIndex = 0; 1790 DWORD dwIndex = 0;
@@ -1861,6 +1879,7 @@ namespace Bootstrapper
1861 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 1879 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
1862 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 1880 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
1863 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 1881 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
1882 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
1864 1883
1865 BOOL fRollback = FALSE; 1884 BOOL fRollback = FALSE;
1866 DWORD dwIndex = 0; 1885 DWORD dwIndex = 0;
@@ -1992,6 +2011,7 @@ namespace Bootstrapper
1992 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 2011 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
1993 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 2012 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
1994 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 2013 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
2014 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
1995 2015
1996 BOOL fRollback = FALSE; 2016 BOOL fRollback = FALSE;
1997 DWORD dwIndex = 0; 2017 DWORD dwIndex = 0;
@@ -2108,6 +2128,7 @@ namespace Bootstrapper
2108 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 2128 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
2109 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 2129 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
2110 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 2130 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
2131 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
2111 2132
2112 BOOL fRollback = FALSE; 2133 BOOL fRollback = FALSE;
2113 DWORD dwIndex = 0; 2134 DWORD dwIndex = 0;
@@ -2203,6 +2224,7 @@ namespace Bootstrapper
2203 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback); 2224 Assert::Equal<BOOL>(FALSE, pPlan->fDisableRollback);
2204 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval); 2225 Assert::Equal<BOOL>(FALSE, pPlan->fDisallowRemoval);
2205 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade); 2226 Assert::Equal<BOOL>(FALSE, pPlan->fDowngrade);
2227 Assert::Equal<DWORD>(BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY, pPlan->dwRegistrationOperations);
2206 2228
2207 BOOL fRollback = FALSE; 2229 BOOL fRollback = FALSE;
2208 DWORD dwIndex = 0; 2230 DWORD dwIndex = 0;
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs
index c0e54300..636c68cb 100644
--- a/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs
@@ -208,7 +208,6 @@ namespace WixToolset.Core.Burn.Bundles
208 writer.WriteAttributeString("ProviderKey", this.BundleSymbol.ProviderKey); 208 writer.WriteAttributeString("ProviderKey", this.BundleSymbol.ProviderKey);
209 209
210 writer.WriteStartElement("Arp"); 210 writer.WriteStartElement("Arp");
211 writer.WriteAttributeString("Register", (this.BundleSymbol.DisableModify || this.BundleSymbol.SingleChangeUninstallButton) && this.BundleSymbol.DisableRemove ? "no" : "yes"); // do not register if disabled modify and remove.
212 writer.WriteAttributeString("DisplayName", this.BundleSymbol.Name); 211 writer.WriteAttributeString("DisplayName", this.BundleSymbol.Name);
213 writer.WriteAttributeString("DisplayVersion", this.BundleSymbol.Version); 212 writer.WriteAttributeString("DisplayVersion", this.BundleSymbol.Version);
214 213
@@ -251,16 +250,16 @@ namespace WixToolset.Core.Burn.Bundles
251 { 250 {
252 writer.WriteAttributeString("DisableModify", "yes"); 251 writer.WriteAttributeString("DisableModify", "yes");
253 } 252 }
253 else if (this.BundleSymbol.SingleChangeUninstallButton)
254 {
255 writer.WriteAttributeString("DisableModify", "button");
256 }
254 257
255 if (this.BundleSymbol.DisableRemove) 258 if (this.BundleSymbol.DisableRemove)
256 { 259 {
257 writer.WriteAttributeString("DisableRemove", "yes"); 260 writer.WriteAttributeString("DisableRemove", "yes");
258 } 261 }
259 262
260 if (this.BundleSymbol.SingleChangeUninstallButton)
261 {
262 writer.WriteAttributeString("DisableModify", "button");
263 }
264 writer.WriteEndElement(); // </Arp> 263 writer.WriteEndElement(); // </Arp>
265 264
266 // Get update registration if specified. 265 // Get update registration if specified.
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
index e4a57d4d..45bc284c 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
@@ -120,7 +120,7 @@ namespace WixToolsetTest.CoreIntegration
120 var registrationElements = extractResult.SelectManifestNodes("/burn:BurnManifest/burn:Registration"); 120 var registrationElements = extractResult.SelectManifestNodes("/burn:BurnManifest/burn:Registration");
121 var registrationElement = (XmlNode)Assert.Single(registrationElements); 121 var registrationElement = (XmlNode)Assert.Single(registrationElements);
122 Assert.Equal($"<Registration Id='{bundleSymbol.BundleId}' ExecutableName='test.exe' PerMachine='yes' Tag='' Version='1.0.0.0' ProviderKey='{bundleSymbol.BundleId}'>" + 122 Assert.Equal($"<Registration Id='{bundleSymbol.BundleId}' ExecutableName='test.exe' PerMachine='yes' Tag='' Version='1.0.0.0' ProviderKey='{bundleSymbol.BundleId}'>" +
123 "<Arp Register='yes' DisplayName='~TestBundle' DisplayVersion='1.0.0.0' InProgressDisplayName='~InProgressTestBundle' Publisher='Example Corporation' />" + 123 "<Arp DisplayName='~TestBundle' DisplayVersion='1.0.0.0' InProgressDisplayName='~InProgressTestBundle' Publisher='Example Corporation' />" +
124 "</Registration>", registrationElement.GetTestXml()); 124 "</Registration>", registrationElement.GetTestXml());
125 125
126 var msiPayloads = extractResult.SelectManifestNodes("/burn:BurnManifest/burn:Payload[@Id='test.msi']"); 126 var msiPayloads = extractResult.SelectManifestNodes("/burn:BurnManifest/burn:Payload[@Id='test.msi']");
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/BundlePackageFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/BundlePackageFixture.cs
index 5f30760e..c2512d6f 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/BundlePackageFixture.cs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/BundlePackageFixture.cs
@@ -109,7 +109,7 @@ namespace WixToolsetTest.CoreIntegration
109 WixAssert.CompareLineByLine(new string[] 109 WixAssert.CompareLineByLine(new string[]
110 { 110 {
111 $"<Registration Id='{parentBundleId}' ExecutableName='parent.exe' PerMachine='yes' Tag='' Version='1.0.1.0' ProviderKey='{parentBundleId}'>" + 111 $"<Registration Id='{parentBundleId}' ExecutableName='parent.exe' PerMachine='yes' Tag='' Version='1.0.1.0' ProviderKey='{parentBundleId}'>" +
112 "<Arp Register='yes' DisplayName='BundlePackageBundle' DisplayVersion='1.0.1.0' Publisher='Example Corporation' />" + 112 "<Arp DisplayName='BundlePackageBundle' DisplayVersion='1.0.1.0' Publisher='Example Corporation' />" +
113 "</Registration>" 113 "</Registration>"
114 }, registrations); 114 }, registrations);
115 115
@@ -196,7 +196,7 @@ namespace WixToolsetTest.CoreIntegration
196 WixAssert.CompareLineByLine(new string[] 196 WixAssert.CompareLineByLine(new string[]
197 { 197 {
198 $"<Registration Id='{parentBundleId}' ExecutableName='parent.exe' PerMachine='yes' Tag='' Version='1.1.1.1' ProviderKey='{parentBundleId}'>" + 198 $"<Registration Id='{parentBundleId}' ExecutableName='parent.exe' PerMachine='yes' Tag='' Version='1.1.1.1' ProviderKey='{parentBundleId}'>" +
199 "<Arp Register='yes' DisplayName='V3BundlePackageBundle' DisplayVersion='1.1.1.1' Publisher='Example Corporation' />" + 199 "<Arp DisplayName='V3BundlePackageBundle' DisplayVersion='1.1.1.1' Publisher='Example Corporation' />" +
200 "</Registration>" 200 "</Registration>"
201 }, registrations); 201 }, registrations);
202 202
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs
index 36855c84..43dbf4f9 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs
@@ -152,7 +152,7 @@ namespace WixToolsetTest.CoreIntegration
152 .ToArray(); 152 .ToArray();
153 WixAssert.CompareLineByLine(new string[] 153 WixAssert.CompareLineByLine(new string[]
154 { 154 {
155 "<Registration Id='*' ExecutableName='test.exe' PerMachine='yes' Tag='' Version='1.0.0.0' ProviderKey='MyProviderKey,v1.0'><Arp Register='yes' DisplayName='BurnBundle' DisplayVersion='1.0.0.0' Publisher='Example Corporation' /></Registration>", 155 "<Registration Id='*' ExecutableName='test.exe' PerMachine='yes' Tag='' Version='1.0.0.0' ProviderKey='MyProviderKey,v1.0'><Arp DisplayName='BurnBundle' DisplayVersion='1.0.0.0' Publisher='Example Corporation' /></Registration>",
156 }, registration); 156 }, registration);
157 } 157 }
158 } 158 }