aboutsummaryrefslogtreecommitdiff
path: root/src/ext/ComPlus/ca/cpapprolesched.cpp
diff options
context:
space:
mode:
authorBevan Weiss <bevan.weiss@gmail.com>2024-07-28 00:12:25 +1000
committerRob Mensching <rob@firegiant.com>2024-12-26 08:26:26 -0800
commitee41358bb583619ef4fe6707958dc3c6c62cd13f (patch)
tree04d702b39cd37be9b6c66c897f6c774a7dd1c0a6 /src/ext/ComPlus/ca/cpapprolesched.cpp
parent85745284cd76858f8699190c53719607e0058712 (diff)
downloadwix-ee41358bb583619ef4fe6707958dc3c6c62cd13f.tar.gz
wix-ee41358bb583619ef4fe6707958dc3c6c62cd13f.tar.bz2
wix-ee41358bb583619ef4fe6707958dc3c6c62cd13f.zip
Fix up COM+ to be back in working order under Wix4+
Table names updated for Wix4 prefix. Custom action names similarly updated. Table names Wix4ComPlusUserInApplicationRole, Wix4ComPlusGroupInApplicationRole and Wix4ComPlusApplicationRoleProperty had to be shortened to fit within MSI 31 character table name limit. Migrated from fixed GUID for RegistrationHelper to use CLSIDFromProgID in an attempt to fix behaviour under .NET 4+ DLLs. Added setting of Partition enable if a Partition is configured in authoring, new Windows config has Partitions disabled by default, and they don't work at all under Windows workstation (non-server) versions. Added a new Runtime condition for `RequireWindowsServer` which will skip execution of Runtime test on workstation/desktop OSes, since COM+ Partitions only work correctly under Windows Server. Quite a lot of basic typos fixed also. Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
Diffstat (limited to 'src/ext/ComPlus/ca/cpapprolesched.cpp')
-rw-r--r--src/ext/ComPlus/ca/cpapprolesched.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ext/ComPlus/ca/cpapprolesched.cpp b/src/ext/ComPlus/ca/cpapprolesched.cpp
index 04de6b65..a92c340c 100644
--- a/src/ext/ComPlus/ca/cpapprolesched.cpp
+++ b/src/ext/ComPlus/ca/cpapprolesched.cpp
@@ -10,13 +10,13 @@ LPCWSTR vcsApplicationRoleQuery =
10enum eApplicationRoleQuery { arqApplicationRole = 1, arqApplication, arqComponent, arqName }; 10enum eApplicationRoleQuery { arqApplicationRole = 1, arqApplication, arqComponent, arqName };
11 11
12LPCWSTR vcsUserInApplicationRoleQuery = 12LPCWSTR vcsUserInApplicationRoleQuery =
13 L"SELECT `UserInApplicationRole`, `ApplicationRole_`, `ComPlusUserInApplicationRole`.`Component_`, `Domain`, `Name` FROM `Wix4ComPlusUserInApplicationRole`, `Wix4User` WHERE `User_` = `User`"; 13 L"SELECT `UserInApplicationRole`, `ApplicationRole_`, `Wix4ComPlusUserInAppRole`.`Component_`, `Domain`, `Name` FROM `Wix4ComPlusUserInAppRole`, `Wix4User` WHERE `User_` = `User`";
14LPCWSTR vcsGroupInApplicationRoleQuery = 14LPCWSTR vcsGroupInApplicationRoleQuery =
15 L"SELECT `GroupInApplicationRole`, `ApplicationRole_`, `ComPlusGroupInApplicationRole`.`Component_`, `Domain`, `Name` FROM `Wix4ComPlusGroupInApplicationRole`, `Wix4Group` WHERE `Group_` = `Group`"; 15 L"SELECT `GroupInApplicationRole`, `ApplicationRole_`, `Wix4ComPlusGroupInAppRole`.`Component_`, `Domain`, `Name` FROM `Wix4ComPlusGroupInAppRole`, `Wix4Group` WHERE `Group_` = `Group`";
16enum eTrusteeInApplicationRoleQuery { tiarqUserInApplicationRole = 1, tiarqApplicationRole, tiarqComponent, tiarqDomain, tiarqName }; 16enum eTrusteeInApplicationRoleQuery { tiarqUserInApplicationRole = 1, tiarqApplicationRole, tiarqComponent, tiarqDomain, tiarqName };
17 17
18LPCWSTR vcsApplicationRolePropertyQuery = 18LPCWSTR vcsApplicationRolePropertyQuery =
19 L"SELECT `Name`, `Value` FROM `Wix4ComPlusApplicationRoleProperty` WHERE `ApplicationRole_` = ?"; 19 L"SELECT `Name`, `Value` FROM `Wix4ComPlusAppRoleProperty` WHERE `ApplicationRole_` = ?";
20 20
21 21
22// property definitions 22// property definitions
@@ -95,7 +95,7 @@ HRESULT CpiApplicationRolesRead(
95 95
96 // loop through all application roles 96 // loop through all application roles
97 hr = WcaOpenExecuteView(vcsApplicationRoleQuery, &hView); 97 hr = WcaOpenExecuteView(vcsApplicationRoleQuery, &hView);
98 ExitOnFailure(hr, "Failed to execute view on ComPlusApplicationRole table"); 98 ExitOnFailure(hr, "Failed to execute view on Wix4ComPlusApplicationRole table");
99 99
100 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 100 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
101 { 101 {
@@ -205,7 +205,7 @@ HRESULT CpiApplicationRolesVerifyInstall(
205 if (!pItm->fReferencedForInstall && !(pItm->fHasComponent && WcaIsInstalling(pItm->isInstalled, pItm->isAction))) 205 if (!pItm->fReferencedForInstall && !(pItm->fHasComponent && WcaIsInstalling(pItm->isInstalled, pItm->isAction)))
206 continue; 206 continue;
207 207
208 // if the role is referensed and is not a locater, it must be installed 208 // if the role is referenced and is not a locater, it must be installed
209 if (pItm->fReferencedForInstall && pItm->fHasComponent && !CpiWillBeInstalled(pItm->isInstalled, pItm->isAction)) 209 if (pItm->fReferencedForInstall && pItm->fHasComponent && !CpiWillBeInstalled(pItm->isInstalled, pItm->isAction))
210 MessageExitOnFailure(hr = E_FAIL, msierrComPlusApplicationRoleDependency, "An application role is used by another entity being installed, but is not installed itself, key: %S", pItm->wzKey); 210 MessageExitOnFailure(hr = E_FAIL, msierrComPlusApplicationRoleDependency, "An application role is used by another entity being installed, but is not installed itself, key: %S", pItm->wzKey);
211 211
@@ -235,7 +235,7 @@ HRESULT CpiApplicationRolesVerifyInstall(
235 switch (er) 235 switch (er)
236 { 236 {
237 case IDABORT: 237 case IDABORT:
238 ExitOnFailure(hr = E_FAIL, "An application with a conflictiong name exists, key: %S", pItm->wzKey); 238 ExitOnFailure(hr = E_FAIL, "An application with a conflicting name exists, key: %S", pItm->wzKey);
239 break; 239 break;
240 case IDRETRY: 240 case IDRETRY:
241 break; 241 break;
@@ -319,7 +319,7 @@ HRESULT CpiApplicationRolesInstall(
319 int iActionType; 319 int iActionType;
320 320
321 // add action text 321 // add action text
322 hr = CpiAddActionTextToActionData(L"CreateComPlusApplicationRoles", ppwzActionData); 322 hr = CpiAddActionTextToActionData(CUSTOM_ACTION_DECORATION(L"CreateComPlusApplicationRoles"), ppwzActionData);
323 ExitOnFailure(hr, "Failed to add action text to custom action data"); 323 ExitOnFailure(hr, "Failed to add action text to custom action data");
324 324
325 // add count to action data 325 // add count to action data
@@ -371,7 +371,7 @@ HRESULT CpiApplicationRolesUninstall(
371 int iActionType; 371 int iActionType;
372 372
373 // add action text 373 // add action text
374 hr = CpiAddActionTextToActionData(L"RemoveComPlusApplicationRoles", ppwzActionData); 374 hr = CpiAddActionTextToActionData(CUSTOM_ACTION_DECORATION(L"RemoveComPlusApplicationRoles"), ppwzActionData);
375 ExitOnFailure(hr, "Failed to add action text to custom action data"); 375 ExitOnFailure(hr, "Failed to add action text to custom action data");
376 376
377 // add count to action data 377 // add count to action data
@@ -477,7 +477,7 @@ HRESULT CpiUsersInApplicationRolesInstall(
477 int iActionType; 477 int iActionType;
478 478
479 // add action text 479 // add action text
480 hr = CpiAddActionTextToActionData(L"AddUsersToComPlusApplicationRoles", ppwzActionData); 480 hr = CpiAddActionTextToActionData(CUSTOM_ACTION_DECORATION(L"AddUsersToComPlusApplicationRoles"), ppwzActionData);
481 ExitOnFailure(hr, "Failed to add action text to custom action data"); 481 ExitOnFailure(hr, "Failed to add action text to custom action data");
482 482
483 // add count to action data 483 // add count to action data
@@ -529,7 +529,7 @@ HRESULT CpiUsersInApplicationRolesUninstall(
529 int iActionType; 529 int iActionType;
530 530
531 // add action text 531 // add action text
532 hr = CpiAddActionTextToActionData(L"RemoveUsersFromComPlusAppRoles", ppwzActionData); 532 hr = CpiAddActionTextToActionData(CUSTOM_ACTION_DECORATION(L"RemoveUsersFromComPlusAppRoles"), ppwzActionData);
533 ExitOnFailure(hr, "Failed to add action text to custom action data"); 533 ExitOnFailure(hr, "Failed to add action text to custom action data");
534 534
535 // add count to action data 535 // add count to action data