diff options
Diffstat (limited to 'src/ext/ComPlus/ca/cpsched.cpp')
-rw-r--r-- | src/ext/ComPlus/ca/cpsched.cpp | 80 |
1 files changed, 33 insertions, 47 deletions
diff --git a/src/ext/ComPlus/ca/cpsched.cpp b/src/ext/ComPlus/ca/cpsched.cpp index ebc547ae..acde3cd3 100644 --- a/src/ext/ComPlus/ca/cpsched.cpp +++ b/src/ext/ComPlus/ca/cpsched.cpp | |||
@@ -3,31 +3,17 @@ | |||
3 | #include "precomp.h" | 3 | #include "precomp.h" |
4 | 4 | ||
5 | 5 | ||
6 | #ifdef _WIN64 | 6 | #define CP_COMPLUSROLLBACKINSTALLPREPARE CUSTOM_ACTION_DECORATION(L"ComPlusRollbackInstallPrepare") |
7 | #define CP_COMPLUSROLLBACKINSTALLPREPARE L"ComPlusRollbackInstallPrepare_64" | 7 | #define CP_COMPLUSINSTALLPREPARE CUSTOM_ACTION_DECORATION(L"ComPlusInstallPrepare") |
8 | #define CP_COMPLUSINSTALLPREPARE L"ComPlusInstallPrepare_64" | 8 | #define CP_COMPLUSROLLBACKINSTALLEXECUTE CUSTOM_ACTION_DECORATION(L"ComPlusRollbackInstallExecute") |
9 | #define CP_COMPLUSROLLBACKINSTALLEXECUTE L"ComPlusRollbackInstallExecute_64" | 9 | #define CP_COMPLUSINSTALLEXECUTE CUSTOM_ACTION_DECORATION(L"ComPlusInstallExecute") |
10 | #define CP_COMPLUSINSTALLEXECUTE L"ComPlusInstallExecute_64" | 10 | #define CP_COMPLUSINSTALLEXECUTECOMMIT CUSTOM_ACTION_DECORATION(L"ComPlusInstallExecuteCommit") |
11 | #define CP_COMPLUSINSTALLEXECUTECOMMIT L"ComPlusInstallExecuteCommit_64" | 11 | #define CP_COMPLUSINSTALLCOMMIT CUSTOM_ACTION_DECORATION(L"ComPlusInstallCommit") |
12 | #define CP_COMPLUSINSTALLCOMMIT L"ComPlusInstallCommit_64" | 12 | #define CP_COMPLUSROLLBACKINSTALLPREPARE CUSTOM_ACTION_DECORATION(L"ComPlusRollbackInstallPrepare") |
13 | #define CP_COMPLUSROLLBACKINSTALLPREPARE L"ComPlusRollbackInstallPrepare_64" | 13 | #define CP_COMPLUSINSTALLPREPARE CUSTOM_ACTION_DECORATION(L"ComPlusInstallPrepare") |
14 | #define CP_COMPLUSINSTALLPREPARE L"ComPlusInstallPrepare_64" | 14 | #define CP_COMPLUSROLLBACKUNINSTALLEXECUTE CUSTOM_ACTION_DECORATION(L"ComPlusRollbackUninstallExecute") |
15 | #define CP_COMPLUSROLLBACKUNINSTALLEXECUTE L"ComPlusRollbackUninstallExecute_64" | 15 | #define CP_COMPLUSUNINSTALLEXECUTE CUSTOM_ACTION_DECORATION(L"ComPlusUninstallExecute") |
16 | #define CP_COMPLUSUNINSTALLEXECUTE L"ComPlusUninstallExecute_64" | 16 | #define CP_COMPLUSINSTALLCOMMIT CUSTOM_ACTION_DECORATION(L"ComPlusInstallCommit") |
17 | #define CP_COMPLUSINSTALLCOMMIT L"ComPlusInstallCommit_64" | ||
18 | #else | ||
19 | #define CP_COMPLUSROLLBACKINSTALLPREPARE L"ComPlusRollbackInstallPrepare" | ||
20 | #define CP_COMPLUSINSTALLPREPARE L"ComPlusInstallPrepare" | ||
21 | #define CP_COMPLUSROLLBACKINSTALLEXECUTE L"ComPlusRollbackInstallExecute" | ||
22 | #define CP_COMPLUSINSTALLEXECUTE L"ComPlusInstallExecute" | ||
23 | #define CP_COMPLUSINSTALLEXECUTECOMMIT L"ComPlusInstallExecuteCommit" | ||
24 | #define CP_COMPLUSINSTALLCOMMIT L"ComPlusInstallCommit" | ||
25 | #define CP_COMPLUSROLLBACKINSTALLPREPARE L"ComPlusRollbackInstallPrepare" | ||
26 | #define CP_COMPLUSINSTALLPREPARE L"ComPlusInstallPrepare" | ||
27 | #define CP_COMPLUSROLLBACKUNINSTALLEXECUTE L"ComPlusRollbackUninstallExecute" | ||
28 | #define CP_COMPLUSUNINSTALLEXECUTE L"ComPlusUninstallExecute" | ||
29 | #define CP_COMPLUSINSTALLCOMMIT L"ComPlusInstallCommit" | ||
30 | #endif | ||
31 | 17 | ||
32 | /******************************************************************** | 18 | /******************************************************************** |
33 | ConfigureComPlusInstall - CUSTOM ACTION ENTRY POINT for installing COM+ components | 19 | ConfigureComPlusInstall - CUSTOM ACTION ENTRY POINT for installing COM+ components |
@@ -81,7 +67,7 @@ extern "C" UINT __stdcall ConfigureComPlusInstall(MSIHANDLE hInstall) | |||
81 | 67 | ||
82 | CpiSchedInitialize(); | 68 | CpiSchedInitialize(); |
83 | 69 | ||
84 | // check for the prerequsite tables | 70 | // check for the prerequisite tables |
85 | if (!CpiTableExists(cptComPlusPartition) && !CpiTableExists(cptComPlusApplication) && !CpiTableExists(cptComPlusAssembly)) | 71 | if (!CpiTableExists(cptComPlusPartition) && !CpiTableExists(cptComPlusApplication) && !CpiTableExists(cptComPlusAssembly)) |
86 | { | 72 | { |
87 | WcaLog(LOGMSG_VERBOSE, "skipping install COM+ CustomAction, no ComPlusPartition, ComPlusApplication or ComPlusAssembly table present"); | 73 | WcaLog(LOGMSG_VERBOSE, "skipping install COM+ CustomAction, no ComPlusPartition, ComPlusApplication or ComPlusAssembly table present"); |
@@ -117,55 +103,55 @@ extern "C" UINT __stdcall ConfigureComPlusInstall(MSIHANDLE hInstall) | |||
117 | if (502 <= iVersionNT && CpiTableExists(cptComPlusPartition)) | 103 | if (502 <= iVersionNT && CpiTableExists(cptComPlusPartition)) |
118 | { | 104 | { |
119 | hr = CpiPartitionsRead(&partList); | 105 | hr = CpiPartitionsRead(&partList); |
120 | MessageExitOnFailure(hr, msierrComPlusPartitionReadFailed, "Failed to read ComPlusPartitions table"); | 106 | MessageExitOnFailure(hr, msierrComPlusPartitionReadFailed, "Failed to read Wix4ComPlusPartitions table"); |
121 | } | 107 | } |
122 | 108 | ||
123 | if (502 <= iVersionNT && CpiTableExists(cptComPlusPartitionRole)) | 109 | if (502 <= iVersionNT && CpiTableExists(cptComPlusPartitionRole)) |
124 | { | 110 | { |
125 | hr = CpiPartitionRolesRead(&partList, &partRoleList); | 111 | hr = CpiPartitionRolesRead(&partList, &partRoleList); |
126 | MessageExitOnFailure(hr, msierrComPlusPartitionRoleReadFailed, "Failed to read ComPlusPartitionRole table"); | 112 | MessageExitOnFailure(hr, msierrComPlusPartitionRoleReadFailed, "Failed to read Wix4ComPlusPartitionRole table"); |
127 | } | 113 | } |
128 | 114 | ||
129 | if (502 <= iVersionNT && (CpiTableExists(cptComPlusUserInPartitionRole) || CpiTableExists(cptComPlusGroupInPartitionRole))) | 115 | if (502 <= iVersionNT && (CpiTableExists(cptComPlusUserInPartitionRole) || CpiTableExists(cptComPlusGroupInPartitionRole))) |
130 | { | 116 | { |
131 | hr = CpiUsersInPartitionRolesRead(&partRoleList, &usrInPartRoleList); | 117 | hr = CpiUsersInPartitionRolesRead(&partRoleList, &usrInPartRoleList); |
132 | MessageExitOnFailure(hr, msierrComPlusUserInPartitionRoleReadFailed, "Failed to read ComPlusUserInPartitionRole table"); | 118 | MessageExitOnFailure(hr, msierrComPlusUserInPartitionRoleReadFailed, "Failed to read Wix4ComPlusUserInPartitionRole table"); |
133 | } | 119 | } |
134 | 120 | ||
135 | if (502 <= iVersionNT && CpiTableExists(cptComPlusPartitionUser)) | 121 | if (502 <= iVersionNT && CpiTableExists(cptComPlusPartitionUser)) |
136 | { | 122 | { |
137 | hr = CpiPartitionUsersRead(&partList, &partUsrList); | 123 | hr = CpiPartitionUsersRead(&partList, &partUsrList); |
138 | MessageExitOnFailure(hr, msierrComPlusPartitionUserReadFailed, "Failed to read ComPlusPartitionUser table"); | 124 | MessageExitOnFailure(hr, msierrComPlusPartitionUserReadFailed, "Failed to read Wix4ComPlusPartitionUser table"); |
139 | } | 125 | } |
140 | 126 | ||
141 | if (CpiTableExists(cptComPlusApplication)) | 127 | if (CpiTableExists(cptComPlusApplication)) |
142 | { | 128 | { |
143 | hr = CpiApplicationsRead(&partList, &appList); | 129 | hr = CpiApplicationsRead(&partList, &appList); |
144 | MessageExitOnFailure(hr, msierrComPlusApplicationReadFailed, "Failed to read ComPlusApplication table"); | 130 | MessageExitOnFailure(hr, msierrComPlusApplicationReadFailed, "Failed to read Wix4ComPlusApplication table"); |
145 | } | 131 | } |
146 | 132 | ||
147 | if (CpiTableExists(cptComPlusApplicationRole)) | 133 | if (CpiTableExists(cptComPlusApplicationRole)) |
148 | { | 134 | { |
149 | hr = CpiApplicationRolesRead(&appList, &appRoleList); | 135 | hr = CpiApplicationRolesRead(&appList, &appRoleList); |
150 | MessageExitOnFailure(hr, msierrComPlusApplicationRoleReadFailed, "Failed to read ComPlusApplicationRole table"); | 136 | MessageExitOnFailure(hr, msierrComPlusApplicationRoleReadFailed, "Failed to read Wix4ComPlusApplicationRole table"); |
151 | } | 137 | } |
152 | 138 | ||
153 | if (CpiTableExists(cptComPlusUserInApplicationRole) || CpiTableExists(cptComPlusGroupInApplicationRole)) | 139 | if (CpiTableExists(cptComPlusUserInApplicationRole) || CpiTableExists(cptComPlusGroupInApplicationRole)) |
154 | { | 140 | { |
155 | hr = CpiUsersInApplicationRolesRead(&appRoleList, &usrInAppRoleList); | 141 | hr = CpiUsersInApplicationRolesRead(&appRoleList, &usrInAppRoleList); |
156 | MessageExitOnFailure(hr, msierrComPlusUserInApplicationRoleReadFailed, "Failed to read ComPlusUserInApplicationRole table"); | 142 | MessageExitOnFailure(hr, msierrComPlusUserInApplicationRoleReadFailed, "Failed to read Wix4ComPlusUserInApplicationRole table"); |
157 | } | 143 | } |
158 | 144 | ||
159 | if (CpiTableExists(cptComPlusAssembly)) | 145 | if (CpiTableExists(cptComPlusAssembly)) |
160 | { | 146 | { |
161 | hr = CpiAssembliesRead(&appList, &appRoleList, &asmList); | 147 | hr = CpiAssembliesRead(&appList, &appRoleList, &asmList); |
162 | MessageExitOnFailure(hr, msierrComPlusAssembliesReadFailed, "Failed to read ComPlusAssembly table"); | 148 | MessageExitOnFailure(hr, msierrComPlusAssembliesReadFailed, "Failed to read Wix4ComPlusAssembly table"); |
163 | } | 149 | } |
164 | 150 | ||
165 | if (CpiTableExists(cptComPlusSubscription)) | 151 | if (CpiTableExists(cptComPlusSubscription)) |
166 | { | 152 | { |
167 | hr = CpiSubscriptionsRead(&asmList, &subList); | 153 | hr = CpiSubscriptionsRead(&asmList, &subList); |
168 | MessageExitOnFailure(hr, msierrComPlusSubscriptionReadFailed, "Failed to read ComPlusSubscription table"); | 154 | MessageExitOnFailure(hr, msierrComPlusSubscriptionReadFailed, "Failed to read Wix4ComPlusSubscription table"); |
169 | } | 155 | } |
170 | 156 | ||
171 | // verify elements | 157 | // verify elements |
@@ -295,7 +281,7 @@ LExit: | |||
295 | CpiAssemblyListFree(&asmList); | 281 | CpiAssemblyListFree(&asmList); |
296 | CpiSubscriptionListFree(&subList); | 282 | CpiSubscriptionListFree(&subList); |
297 | 283 | ||
298 | // unitialize | 284 | // uninitialize |
299 | CpiSchedFinalize(); | 285 | CpiSchedFinalize(); |
300 | 286 | ||
301 | if (fInitializedCom) | 287 | if (fInitializedCom) |
@@ -359,7 +345,7 @@ extern "C" UINT __stdcall ConfigureComPlusUninstall(MSIHANDLE hInstall) | |||
359 | // check for the prerequsite tables | 345 | // check for the prerequsite tables |
360 | if (!CpiTableExists(cptComPlusPartition) && !CpiTableExists(cptComPlusApplication) && !CpiTableExists(cptComPlusAssembly)) | 346 | if (!CpiTableExists(cptComPlusPartition) && !CpiTableExists(cptComPlusApplication) && !CpiTableExists(cptComPlusAssembly)) |
361 | { | 347 | { |
362 | WcaLog(LOGMSG_VERBOSE, "skipping uninstall COM+ CustomAction, no ComPlusPartition, ComPlusApplication or ComPlusAssembly table present"); | 348 | WcaLog(LOGMSG_VERBOSE, "skipping uninstall COM+ CustomAction, no Wix4ComPlusPartition, Wix4ComPlusApplication or Wix4ComPlusAssembly table present"); |
363 | ExitFunction1(hr = S_FALSE); | 349 | ExitFunction1(hr = S_FALSE); |
364 | } | 350 | } |
365 | 351 | ||
@@ -392,55 +378,55 @@ extern "C" UINT __stdcall ConfigureComPlusUninstall(MSIHANDLE hInstall) | |||
392 | if (502 <= iVersionNT && CpiTableExists(cptComPlusPartition)) | 378 | if (502 <= iVersionNT && CpiTableExists(cptComPlusPartition)) |
393 | { | 379 | { |
394 | hr = CpiPartitionsRead(&partList); | 380 | hr = CpiPartitionsRead(&partList); |
395 | MessageExitOnFailure(hr, msierrComPlusPartitionReadFailed, "Failed to read ComPlusPartitions table"); | 381 | MessageExitOnFailure(hr, msierrComPlusPartitionReadFailed, "Failed to read Wix4ComPlusPartitions table"); |
396 | } | 382 | } |
397 | 383 | ||
398 | if (502 <= iVersionNT && CpiTableExists(cptComPlusPartitionRole)) | 384 | if (502 <= iVersionNT && CpiTableExists(cptComPlusPartitionRole)) |
399 | { | 385 | { |
400 | hr = CpiPartitionRolesRead(&partList, &partRoleList); | 386 | hr = CpiPartitionRolesRead(&partList, &partRoleList); |
401 | MessageExitOnFailure(hr, msierrComPlusPartitionRoleReadFailed, "Failed to read ComPlusPartitionRole table"); | 387 | MessageExitOnFailure(hr, msierrComPlusPartitionRoleReadFailed, "Failed to read Wix4ComPlusPartitionRole table"); |
402 | } | 388 | } |
403 | 389 | ||
404 | if (502 <= iVersionNT && (CpiTableExists(cptComPlusUserInPartitionRole) || CpiTableExists(cptComPlusGroupInPartitionRole))) | 390 | if (502 <= iVersionNT && (CpiTableExists(cptComPlusUserInPartitionRole) || CpiTableExists(cptComPlusGroupInPartitionRole))) |
405 | { | 391 | { |
406 | hr = CpiUsersInPartitionRolesRead(&partRoleList, &usrInPartRoleList); | 392 | hr = CpiUsersInPartitionRolesRead(&partRoleList, &usrInPartRoleList); |
407 | MessageExitOnFailure(hr, msierrComPlusUserInPartitionRoleReadFailed, "Failed to read ComPlusUserInPartitionRole table"); | 393 | MessageExitOnFailure(hr, msierrComPlusUserInPartitionRoleReadFailed, "Failed to read Wix4ComPlusUserInPartitionRole table"); |
408 | } | 394 | } |
409 | 395 | ||
410 | if (502 <= iVersionNT && CpiTableExists(cptComPlusPartitionUser)) | 396 | if (502 <= iVersionNT && CpiTableExists(cptComPlusPartitionUser)) |
411 | { | 397 | { |
412 | hr = CpiPartitionUsersRead(&partList, &partUsrList); | 398 | hr = CpiPartitionUsersRead(&partList, &partUsrList); |
413 | MessageExitOnFailure(hr, msierrComPlusPartitionUserReadFailed, "Failed to read ComPlusPartitionUser table"); | 399 | MessageExitOnFailure(hr, msierrComPlusPartitionUserReadFailed, "Failed to read Wix4ComPlusPartitionUser table"); |
414 | } | 400 | } |
415 | 401 | ||
416 | if (CpiTableExists(cptComPlusApplication)) | 402 | if (CpiTableExists(cptComPlusApplication)) |
417 | { | 403 | { |
418 | hr = CpiApplicationsRead(&partList, &appList); | 404 | hr = CpiApplicationsRead(&partList, &appList); |
419 | MessageExitOnFailure(hr, msierrComPlusApplicationReadFailed, "Failed to read ComPlusApplication table"); | 405 | MessageExitOnFailure(hr, msierrComPlusApplicationReadFailed, "Failed to read Wix4ComPlusApplication table"); |
420 | } | 406 | } |
421 | 407 | ||
422 | if (CpiTableExists(cptComPlusApplicationRole)) | 408 | if (CpiTableExists(cptComPlusApplicationRole)) |
423 | { | 409 | { |
424 | hr = CpiApplicationRolesRead(&appList, &appRoleList); | 410 | hr = CpiApplicationRolesRead(&appList, &appRoleList); |
425 | MessageExitOnFailure(hr, msierrComPlusApplicationRoleReadFailed, "Failed to read ComPlusApplicationRole table"); | 411 | MessageExitOnFailure(hr, msierrComPlusApplicationRoleReadFailed, "Failed to read Wix4ComPlusApplicationRole table"); |
426 | } | 412 | } |
427 | 413 | ||
428 | if (CpiTableExists(cptComPlusUserInApplicationRole) || CpiTableExists(cptComPlusGroupInApplicationRole)) | 414 | if (CpiTableExists(cptComPlusUserInApplicationRole) || CpiTableExists(cptComPlusGroupInApplicationRole)) |
429 | { | 415 | { |
430 | hr = CpiUsersInApplicationRolesRead(&appRoleList, &usrInAppRoleList); | 416 | hr = CpiUsersInApplicationRolesRead(&appRoleList, &usrInAppRoleList); |
431 | MessageExitOnFailure(hr, msierrComPlusUserInApplicationRoleReadFailed, "Failed to read ComPlusUserInApplicationRole table"); | 417 | MessageExitOnFailure(hr, msierrComPlusUserInApplicationRoleReadFailed, "Failed to read Wix4ComPlusUserInApplicationRole table"); |
432 | } | 418 | } |
433 | 419 | ||
434 | if (CpiTableExists(cptComPlusAssembly)) | 420 | if (CpiTableExists(cptComPlusAssembly)) |
435 | { | 421 | { |
436 | hr = CpiAssembliesRead(&appList, &appRoleList, &asmList); | 422 | hr = CpiAssembliesRead(&appList, &appRoleList, &asmList); |
437 | MessageExitOnFailure(hr, msierrComPlusAssembliesReadFailed, "Failed to read ComPlusAssembly table"); | 423 | MessageExitOnFailure(hr, msierrComPlusAssembliesReadFailed, "Failed to read Wix4ComPlusAssembly table"); |
438 | } | 424 | } |
439 | 425 | ||
440 | if (CpiTableExists(cptComPlusSubscription)) | 426 | if (CpiTableExists(cptComPlusSubscription)) |
441 | { | 427 | { |
442 | hr = CpiSubscriptionsRead(&asmList, &subList); | 428 | hr = CpiSubscriptionsRead(&asmList, &subList); |
443 | MessageExitOnFailure(hr, msierrComPlusSubscriptionReadFailed, "Failed to read ComPlusSubscription table"); | 429 | MessageExitOnFailure(hr, msierrComPlusSubscriptionReadFailed, "Failed to read Wix4ComPlusSubscription table"); |
444 | } | 430 | } |
445 | 431 | ||
446 | // verify elements | 432 | // verify elements |
@@ -555,7 +541,7 @@ LExit: | |||
555 | CpiAssemblyListFree(&asmList); | 541 | CpiAssemblyListFree(&asmList); |
556 | CpiSubscriptionListFree(&subList); | 542 | CpiSubscriptionListFree(&subList); |
557 | 543 | ||
558 | // unitialize | 544 | // uninitialize |
559 | CpiSchedFinalize(); | 545 | CpiSchedFinalize(); |
560 | 546 | ||
561 | if (fInitializedCom) | 547 | if (fInitializedCom) |