diff options
author | Bevan Weiss <bevan.weiss@gmail.com> | 2024-07-28 00:12:25 +1000 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2024-12-26 08:26:26 -0800 |
commit | ee41358bb583619ef4fe6707958dc3c6c62cd13f (patch) | |
tree | 04d702b39cd37be9b6c66c897f6c774a7dd1c0a6 | |
parent | 85745284cd76858f8699190c53719607e0058712 (diff) | |
download | wix-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>
31 files changed, 446 insertions, 120 deletions
diff --git a/src/ext/ComPlus/ca/cpapproleexec.cpp b/src/ext/ComPlus/ca/cpapproleexec.cpp index e3b71e93..4b38b23c 100644 --- a/src/ext/ComPlus/ca/cpapproleexec.cpp +++ b/src/ext/ComPlus/ca/cpapproleexec.cpp | |||
@@ -74,7 +74,7 @@ HRESULT CpiConfigureApplicationRoles( | |||
74 | hr = CpiActionStartMessage(ppwzData, FALSE); | 74 | hr = CpiActionStartMessage(ppwzData, FALSE); |
75 | ExitOnFailure(hr, "Failed to send action start message"); | 75 | ExitOnFailure(hr, "Failed to send action start message"); |
76 | 76 | ||
77 | // ger count | 77 | // get count |
78 | int iCnt = 0; | 78 | int iCnt = 0; |
79 | hr = WcaReadIntegerFromCaData(ppwzData, &iCnt); | 79 | hr = WcaReadIntegerFromCaData(ppwzData, &iCnt); |
80 | ExitOnFailure(hr, "Failed to read count"); | 80 | ExitOnFailure(hr, "Failed to read count"); |
@@ -218,7 +218,7 @@ HRESULT CpiConfigureUsersInApplicationRoles( | |||
218 | hr = CpiActionStartMessage(ppwzData, FALSE); | 218 | hr = CpiActionStartMessage(ppwzData, FALSE); |
219 | ExitOnFailure(hr, "Failed to send action start message"); | 219 | ExitOnFailure(hr, "Failed to send action start message"); |
220 | 220 | ||
221 | // ger count | 221 | // get count |
222 | int iCnt = 0; | 222 | int iCnt = 0; |
223 | hr = WcaReadIntegerFromCaData(ppwzData, &iCnt); | 223 | hr = WcaReadIntegerFromCaData(ppwzData, &iCnt); |
224 | ExitOnFailure(hr, "Failed to read count"); | 224 | ExitOnFailure(hr, "Failed to read count"); |
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 = | |||
10 | enum eApplicationRoleQuery { arqApplicationRole = 1, arqApplication, arqComponent, arqName }; | 10 | enum eApplicationRoleQuery { arqApplicationRole = 1, arqApplication, arqComponent, arqName }; |
11 | 11 | ||
12 | LPCWSTR vcsUserInApplicationRoleQuery = | 12 | LPCWSTR 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`"; |
14 | LPCWSTR vcsGroupInApplicationRoleQuery = | 14 | LPCWSTR 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`"; |
16 | enum eTrusteeInApplicationRoleQuery { tiarqUserInApplicationRole = 1, tiarqApplicationRole, tiarqComponent, tiarqDomain, tiarqName }; | 16 | enum eTrusteeInApplicationRoleQuery { tiarqUserInApplicationRole = 1, tiarqApplicationRole, tiarqComponent, tiarqDomain, tiarqName }; |
17 | 17 | ||
18 | LPCWSTR vcsApplicationRolePropertyQuery = | 18 | LPCWSTR 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 |
diff --git a/src/ext/ComPlus/ca/cpappsched.cpp b/src/ext/ComPlus/ca/cpappsched.cpp index 4d867f6b..bcd3bb75 100644 --- a/src/ext/ComPlus/ca/cpappsched.cpp +++ b/src/ext/ComPlus/ca/cpappsched.cpp | |||
@@ -255,7 +255,7 @@ HRESULT CpiApplicationsVerifyInstall( | |||
255 | if (!pItm->fReferencedForInstall && !(pItm->fHasComponent && WcaIsInstalling(pItm->isInstalled, pItm->isAction))) | 255 | if (!pItm->fReferencedForInstall && !(pItm->fHasComponent && WcaIsInstalling(pItm->isInstalled, pItm->isAction))) |
256 | continue; | 256 | continue; |
257 | 257 | ||
258 | // if the application is referensed and is not a locater, it must be installed | 258 | // if the application is referenced and is not a locater, it must be installed |
259 | if (pItm->fReferencedForInstall && pItm->fHasComponent && !CpiWillBeInstalled(pItm->isInstalled, pItm->isAction)) | 259 | if (pItm->fReferencedForInstall && pItm->fHasComponent && !CpiWillBeInstalled(pItm->isInstalled, pItm->isAction)) |
260 | MessageExitOnFailure(hr = E_FAIL, msierrComPlusApplicationDependency, "An application is used by another entity being installed, but is not installed itself, key: %S", pItm->wzKey); | 260 | MessageExitOnFailure(hr = E_FAIL, msierrComPlusApplicationDependency, "An application is used by another entity being installed, but is not installed itself, key: %S", pItm->wzKey); |
261 | 261 | ||
diff --git a/src/ext/ComPlus/ca/cpasmexec.cpp b/src/ext/ComPlus/ca/cpasmexec.cpp index 3d140027..af6c7eff 100644 --- a/src/ext/ComPlus/ca/cpasmexec.cpp +++ b/src/ext/ComPlus/ca/cpasmexec.cpp | |||
@@ -1,7 +1,7 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
2 | 2 | ||
3 | #include "precomp.h" | 3 | #include "precomp.h" |
4 | 4 | #include <mscoree.h> | |
5 | 5 | ||
6 | // GAC related declarations | 6 | // GAC related declarations |
7 | 7 | ||
@@ -61,13 +61,11 @@ public: | |||
61 | 61 | ||
62 | typedef HRESULT (__stdcall *LoadLibraryShimFunc)(LPCWSTR szDllName, LPCWSTR szVersion, LPVOID pvReserved, HMODULE *phModDll); | 62 | typedef HRESULT (__stdcall *LoadLibraryShimFunc)(LPCWSTR szDllName, LPCWSTR szVersion, LPVOID pvReserved, HMODULE *phModDll); |
63 | typedef HRESULT (__stdcall *CreateAssemblyCacheFunc)(IAssemblyCache **ppAsmCache, DWORD dwReserved); | 63 | typedef HRESULT (__stdcall *CreateAssemblyCacheFunc)(IAssemblyCache **ppAsmCache, DWORD dwReserved); |
64 | typedef HRESULT (__stdcall *GetFileVersionFnPtr)(LPCWSTR szFilename, _Out_writes_to_opt_(cchBuffer, *dwLength) LPWSTR szBuffer, DWORD cchBuffer, DWORD* dwLength); | ||
65 | typedef HRESULT (__stdcall *CorBindToRuntimeExFnPtr)(LPCWSTR pwszVersion, LPCWSTR pwszBuildFlavor, DWORD startupFlags, REFCLSID rclsid, REFIID riid, LPVOID FAR* ppv); | ||
64 | 66 | ||
65 | 67 | ||
66 | // RegistrationHelper related declarations | 68 | // RegistrationHelper related declarations |
67 | |||
68 | static const GUID CLSID_RegistrationHelper = | ||
69 | { 0x89a86e7b, 0xc229, 0x4008, { 0x9b, 0xaa, 0x2f, 0x5c, 0x84, 0x11, 0xd7, 0xe0 } }; | ||
70 | |||
71 | enum eInstallationFlags { | 69 | enum eInstallationFlags { |
72 | ifConfigureComponentsOnly = 16, | 70 | ifConfigureComponentsOnly = 16, |
73 | ifFindOrCreateTargetApplication = 4, | 71 | ifFindOrCreateTargetApplication = 4, |
@@ -156,7 +154,8 @@ static HRESULT UnregisterAssembly( | |||
156 | static void InitAssemblyExec(); | 154 | static void InitAssemblyExec(); |
157 | static void UninitAssemblyExec(); | 155 | static void UninitAssemblyExec(); |
158 | static HRESULT GetRegistrationHelper( | 156 | static HRESULT GetRegistrationHelper( |
159 | IDispatch** ppiRegHlp | 157 | IDispatch** ppiRegHlp, |
158 | LPCWSTR pwzAssemblyPath | ||
160 | ); | 159 | ); |
161 | static HRESULT GetAssemblyCacheObject( | 160 | static HRESULT GetAssemblyCacheObject( |
162 | IAssemblyCache** ppAssemblyCache | 161 | IAssemblyCache** ppAssemblyCache |
@@ -722,15 +721,44 @@ static void UninitAssemblyExec() | |||
722 | } | 721 | } |
723 | 722 | ||
724 | static HRESULT GetRegistrationHelper( | 723 | static HRESULT GetRegistrationHelper( |
725 | IDispatch** ppiRegHlp | 724 | IDispatch** ppiRegHlp, |
725 | LPCWSTR pwzAssemblyPath | ||
726 | ) | 726 | ) |
727 | { | 727 | { |
728 | HRESULT hr = S_OK; | 728 | HRESULT hr = S_OK; |
729 | wchar_t pwzVersion[MAX_PATH]; | ||
730 | DWORD pcchVersionLen = MAX_PATH; | ||
731 | ICLRRuntimeHost* runtimeHost = NULL; | ||
732 | |||
733 | if (!ghMscoree) | ||
734 | { | ||
735 | ghMscoree = ::LoadLibraryW(L"mscoree.dll"); | ||
736 | ExitOnNull(ghMscoree, hr, E_FAIL, "Failed to load mscoree.dll"); | ||
737 | } | ||
738 | GetFileVersionFnPtr GetFileVersion = (GetFileVersionFnPtr)::GetProcAddress(ghMscoree, "GetFileVersion"); | ||
739 | ExitOnNull(GetFileVersion, hr, E_FAIL, "Failed to GetProcAddress for 'GetFileVersion' from 'mscoree.dll'"); | ||
740 | hr = GetFileVersion(pwzAssemblyPath, pwzVersion, pcchVersionLen, &pcchVersionLen); | ||
729 | 741 | ||
730 | if (!gpiRegHlp) | 742 | if (!gpiRegHlp) |
731 | { | 743 | { |
744 | CLSID CLSID_RegistrationHelper{}; | ||
745 | hr = ::CLSIDFromProgID(OLESTR("System.EnterpriseServices.RegistrationHelper"), &CLSID_RegistrationHelper); | ||
746 | ExitOnFailure(hr, "Failed to identify CLSID for 'System.EnterpriseServices.RegistrationHelper'"); | ||
747 | |||
748 | // NOTE: The 'CoreBindToRuntimeEx' method is DEPRECATED in .NET v4. | ||
749 | // HOWEVER, we might be running in an earlier context at this point so we don't want to rely upon stuff that is particularly v4 dependent. | ||
750 | // Even if we are about to try to fire up a v4 runtime. | ||
751 | // The .NET v4 runtime with STARTUP_LOADER_SAFEMODE flag (to disable version checking of loaded assemblies) is what lets us launch the | ||
752 | // RegistrationHelper. The v4 RegistrationHelper is able to register both v4 and v3 assemblies however, so if we can get it, we most as well | ||
753 | // use it. | ||
754 | CorBindToRuntimeExFnPtr CorBindToRuntimeEx = (CorBindToRuntimeExFnPtr)::GetProcAddress(ghMscoree, "CorBindToRuntimeEx"); | ||
755 | hr = CorBindToRuntimeEx(L"v4.0.30319", L"wks", STARTUP_LOADER_SAFEMODE, CLSID_CLRRuntimeHost, IID_ICLRRuntimeHost, (LPVOID*)&runtimeHost); | ||
756 | // we ignore the HRESULT here. If it worked, great, we'll use it moving forward. If it didn't work, we'll end up trying to resort to legacy .NET FW | ||
757 | // when we just try the COM Create below | ||
758 | |||
732 | // create registration helper object | 759 | // create registration helper object |
733 | hr = ::CoCreateInstance(CLSID_RegistrationHelper, NULL, CLSCTX_ALL, IID_IDispatch, (void**)&gpiRegHlp); | 760 | // This will be created in the .NET FW 4 version if we managed to launch it above, or in the .NET FW <4 version based on the COM dispatch otherwise |
761 | hr = ::CoCreateInstance(CLSID_RegistrationHelper, NULL, CLSCTX_ALL, IID_IDispatch, (void**)&gpiRegHlp); | ||
734 | ExitOnFailure(hr, "Failed to create registration helper object"); | 762 | ExitOnFailure(hr, "Failed to create registration helper object"); |
735 | } | 763 | } |
736 | 764 | ||
@@ -883,7 +911,7 @@ static HRESULT RegisterDotNetAssembly( | |||
883 | } | 911 | } |
884 | 912 | ||
885 | // get registration helper object | 913 | // get registration helper object |
886 | hr = GetRegistrationHelper(&piRegHlp); | 914 | hr = GetRegistrationHelper(&piRegHlp, pAttrs->pwzDllPath); |
887 | ExitOnFailure(hr, "Failed to get registration helper object"); | 915 | ExitOnFailure(hr, "Failed to get registration helper object"); |
888 | 916 | ||
889 | // get dispatch id of InstallAssembly() method | 917 | // get dispatch id of InstallAssembly() method |
@@ -979,7 +1007,7 @@ static HRESULT RegisterNativeAssembly( | |||
979 | ExitOnNull(bstrTlbPath, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for tlb path"); | 1007 | ExitOnNull(bstrTlbPath, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for tlb path"); |
980 | 1008 | ||
981 | bstrPSDllPath = ::SysAllocString(pAttrs->pwzPSDllPath ? pAttrs->pwzPSDllPath : L""); | 1009 | bstrPSDllPath = ::SysAllocString(pAttrs->pwzPSDllPath ? pAttrs->pwzPSDllPath : L""); |
982 | ExitOnNull(bstrPSDllPath, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for tlb path"); | 1010 | ExitOnNull(bstrPSDllPath, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for proxy/stub dll path"); |
983 | 1011 | ||
984 | // get catalog | 1012 | // get catalog |
985 | hr = CpiExecGetAdminCatalog(&piCatalog); | 1013 | hr = CpiExecGetAdminCatalog(&piCatalog); |
@@ -1089,7 +1117,7 @@ static HRESULT UnregisterDotNetAssembly( | |||
1089 | ExitOnNull(bstrDllPath, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for dll path"); | 1117 | ExitOnNull(bstrDllPath, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for dll path"); |
1090 | 1118 | ||
1091 | // get registration helper object | 1119 | // get registration helper object |
1092 | hr = GetRegistrationHelper(&piRegHlp); | 1120 | hr = GetRegistrationHelper(&piRegHlp, pAttrs->pwzDllPath); |
1093 | ExitOnFailure(hr, "Failed to get registration helper object"); | 1121 | ExitOnFailure(hr, "Failed to get registration helper object"); |
1094 | 1122 | ||
1095 | // get dispatch id of UninstallAssembly() method | 1123 | // get dispatch id of UninstallAssembly() method |
diff --git a/src/ext/ComPlus/ca/cpasmsched.cpp b/src/ext/ComPlus/ca/cpasmsched.cpp index 325808de..044b2ef8 100644 --- a/src/ext/ComPlus/ca/cpasmsched.cpp +++ b/src/ext/ComPlus/ca/cpasmsched.cpp | |||
@@ -408,7 +408,7 @@ HRESULT CpiAssembliesVerifyInstall( | |||
408 | if (!pItm->fReferencedForInstall && !pItm->iRoleAssignmentsInstallCount && !WcaIsInstalling(pItm->isInstalled, pItm->isAction)) | 408 | if (!pItm->fReferencedForInstall && !pItm->iRoleAssignmentsInstallCount && !WcaIsInstalling(pItm->isInstalled, pItm->isAction)) |
409 | continue; | 409 | continue; |
410 | 410 | ||
411 | // if the assembly is referensed, it must be installed | 411 | // if the assembly is referenced, it must be installed |
412 | if ((pItm->fReferencedForInstall || pItm->iRoleAssignmentsInstallCount) && !CpiWillBeInstalled(pItm->isInstalled, pItm->isAction)) | 412 | if ((pItm->fReferencedForInstall || pItm->iRoleAssignmentsInstallCount) && !CpiWillBeInstalled(pItm->isInstalled, pItm->isAction)) |
413 | MessageExitOnFailure(hr = E_FAIL, msierrComPlusAssemblyDependency, "An assembly is used by another entity being installed, but is not installed itself, key: %S", pItm->wzKey); | 413 | MessageExitOnFailure(hr = E_FAIL, msierrComPlusAssemblyDependency, "An assembly is used by another entity being installed, but is not installed itself, key: %S", pItm->wzKey); |
414 | } | 414 | } |
diff --git a/src/ext/ComPlus/ca/cpexec.cpp b/src/ext/ComPlus/ca/cpexec.cpp index 9b1691fc..a915dd34 100644 --- a/src/ext/ComPlus/ca/cpexec.cpp +++ b/src/ext/ComPlus/ca/cpexec.cpp | |||
@@ -180,7 +180,7 @@ LExit: | |||
180 | if (INVALID_HANDLE_VALUE != hRollbackFile) | 180 | if (INVALID_HANDLE_VALUE != hRollbackFile) |
181 | ::CloseHandle(hRollbackFile); | 181 | ::CloseHandle(hRollbackFile); |
182 | 182 | ||
183 | // unitialize | 183 | // uninitialize |
184 | CpiExecFinalize(); | 184 | CpiExecFinalize(); |
185 | 185 | ||
186 | if (fInitializedCom) | 186 | if (fInitializedCom) |
@@ -258,7 +258,7 @@ LExit: | |||
258 | if (INVALID_HANDLE_VALUE != hRollbackFile) | 258 | if (INVALID_HANDLE_VALUE != hRollbackFile) |
259 | ::CloseHandle(hRollbackFile); | 259 | ::CloseHandle(hRollbackFile); |
260 | 260 | ||
261 | // unitialize | 261 | // uninitialize |
262 | CpiExecFinalize(); | 262 | CpiExecFinalize(); |
263 | 263 | ||
264 | if (fInitializedCom) | 264 | if (fInitializedCom) |
@@ -415,7 +415,7 @@ LExit: | |||
415 | if (prdSubscriptions) | 415 | if (prdSubscriptions) |
416 | CpiFreeRollbackDataList(prdSubscriptions); | 416 | CpiFreeRollbackDataList(prdSubscriptions); |
417 | 417 | ||
418 | // unitialize | 418 | // uninitialize |
419 | CpiExecFinalize(); | 419 | CpiExecFinalize(); |
420 | 420 | ||
421 | if (fInitializedCom) | 421 | if (fInitializedCom) |
@@ -521,7 +521,7 @@ LExit: | |||
521 | if (INVALID_HANDLE_VALUE != hRollbackFile) | 521 | if (INVALID_HANDLE_VALUE != hRollbackFile) |
522 | ::CloseHandle(hRollbackFile); | 522 | ::CloseHandle(hRollbackFile); |
523 | 523 | ||
524 | // unitialize | 524 | // uninitialize |
525 | CpiExecFinalize(); | 525 | CpiExecFinalize(); |
526 | 526 | ||
527 | if (fInitializedCom) | 527 | if (fInitializedCom) |
@@ -670,7 +670,7 @@ LExit: | |||
670 | if (prdSubscriptions) | 670 | if (prdSubscriptions) |
671 | CpiFreeRollbackDataList(prdSubscriptions); | 671 | CpiFreeRollbackDataList(prdSubscriptions); |
672 | 672 | ||
673 | // unitialize | 673 | // uninitialize |
674 | CpiExecFinalize(); | 674 | CpiExecFinalize(); |
675 | 675 | ||
676 | if (fInitializedCom) | 676 | if (fInitializedCom) |
diff --git a/src/ext/ComPlus/ca/cppartexec.cpp b/src/ext/ComPlus/ca/cppartexec.cpp index 673bdaf9..06aa16f4 100644 --- a/src/ext/ComPlus/ca/cppartexec.cpp +++ b/src/ext/ComPlus/ca/cppartexec.cpp | |||
@@ -34,6 +34,7 @@ static HRESULT ReadPartitionAttributes( | |||
34 | static void FreePartitionAttributes( | 34 | static void FreePartitionAttributes( |
35 | CPI_PARTITION_ATTRIBUTES* pAttrs | 35 | CPI_PARTITION_ATTRIBUTES* pAttrs |
36 | ); | 36 | ); |
37 | static HRESULT CpiEnsurePartitionsEnabled(); | ||
37 | static HRESULT CreatePartition( | 38 | static HRESULT CreatePartition( |
38 | CPI_PARTITION_ATTRIBUTES* pAttrs | 39 | CPI_PARTITION_ATTRIBUTES* pAttrs |
39 | ); | 40 | ); |
@@ -71,7 +72,7 @@ HRESULT CpiConfigurePartitions( | |||
71 | hr = CpiActionStartMessage(ppwzData, FALSE); | 72 | hr = CpiActionStartMessage(ppwzData, FALSE); |
72 | ExitOnFailure(hr, "Failed to send action start message"); | 73 | ExitOnFailure(hr, "Failed to send action start message"); |
73 | 74 | ||
74 | // ger partition count | 75 | // get partition count |
75 | int iCnt = 0; | 76 | int iCnt = 0; |
76 | hr = WcaReadIntegerFromCaData(ppwzData, &iCnt); | 77 | hr = WcaReadIntegerFromCaData(ppwzData, &iCnt); |
77 | ExitOnFailure(hr, "Failed to read count"); | 78 | ExitOnFailure(hr, "Failed to read count"); |
@@ -215,7 +216,7 @@ HRESULT CpiConfigurePartitionUsers( | |||
215 | hr = CpiActionStartMessage(ppwzData, FALSE); | 216 | hr = CpiActionStartMessage(ppwzData, FALSE); |
216 | ExitOnFailure(hr, "Failed to send action start message"); | 217 | ExitOnFailure(hr, "Failed to send action start message"); |
217 | 218 | ||
218 | // ger partition count | 219 | // get partition count |
219 | int iCnt = 0; | 220 | int iCnt = 0; |
220 | hr = WcaReadIntegerFromCaData(ppwzData, &iCnt); | 221 | hr = WcaReadIntegerFromCaData(ppwzData, &iCnt); |
221 | ExitOnFailure(hr, "Failed to read count"); | 222 | ExitOnFailure(hr, "Failed to read count"); |
@@ -384,6 +385,69 @@ static void FreePartitionAttributes( | |||
384 | CpiFreePropertyList(pAttrs->pPropList); | 385 | CpiFreePropertyList(pAttrs->pPropList); |
385 | } | 386 | } |
386 | 387 | ||
388 | static HRESULT CpiEnsurePartitionsEnabled() | ||
389 | { | ||
390 | HRESULT hr = S_OK; | ||
391 | |||
392 | ICatalogCollection* piLocalComputerColl = NULL; | ||
393 | IDispatch* piDisp = NULL; | ||
394 | ICatalogObject* piLocalComputerObj = NULL; | ||
395 | VARIANT vtVal; | ||
396 | BSTR bsPartitionsEnabledName = ::SysAllocString(L"PartitionsEnabled"); | ||
397 | long numChanges = 0; | ||
398 | |||
399 | ::VariantInit(&vtVal); | ||
400 | |||
401 | // get collection | ||
402 | hr = CpiExecGetCatalogCollection(L"LocalComputer", &piLocalComputerColl); | ||
403 | ExitOnFailure(hr, "Failed to get catalog collection"); | ||
404 | |||
405 | // find object, there will be only one in the LocalComputer collection | ||
406 | hr = piLocalComputerColl->get_Item(0, &piDisp); | ||
407 | ExitOnFailure(hr, "Failed to get object from collection"); | ||
408 | |||
409 | hr = piDisp->QueryInterface(IID_ICatalogObject, (void**)&piLocalComputerObj); | ||
410 | ExitOnFailure(hr, "Failed to get IID_ICatalogObject interface"); | ||
411 | |||
412 | // and then we get the value of the PartitionsEnabled property | ||
413 | hr = piLocalComputerObj->get_Value(bsPartitionsEnabledName, &vtVal); | ||
414 | if (!vtVal.boolVal) | ||
415 | { | ||
416 | vtVal.boolVal = true; | ||
417 | hr = piLocalComputerObj->put_Value(bsPartitionsEnabledName, vtVal); | ||
418 | ExitOnFailure(hr, "Failed to put value to Enable COM+ PartitionsEnabled property"); | ||
419 | hr = piLocalComputerColl->SaveChanges(&numChanges); | ||
420 | ExitOnFailure(hr, "Failed to save PartitionsEnabled property"); | ||
421 | |||
422 | // we'll read back the hopefully updated values of the PartitionsEnabled property | ||
423 | // if it's still False, then we're on a Windows Desktop that doesn't allow Partitions | ||
424 | // (as of Windows Server2003 Microsoft limited Partitions to only ServerOS platforms) | ||
425 | hr = piLocalComputerObj->get_Value(bsPartitionsEnabledName, &vtVal); | ||
426 | ExitOnFailure(hr, "Failed to read PartitionsEnabled property"); | ||
427 | } | ||
428 | |||
429 | if (vtVal.boolVal) | ||
430 | { | ||
431 | // everything went well, we have the Partitioning available | ||
432 | hr = S_OK; | ||
433 | } | ||
434 | else | ||
435 | { | ||
436 | // we're on a Desktop OS, or couldn't otherwise enable partitioning | ||
437 | WcaLog(LOGMSG_STANDARD, "Failed to Enable COM+ PartitionEnabled property. This suggests Partitioning was attempted on a Desktop OS, which is not supported"); | ||
438 | hr = S_FALSE; | ||
439 | } | ||
440 | |||
441 | LExit: | ||
442 | // clean up | ||
443 | ReleaseObject(piLocalComputerColl); | ||
444 | ReleaseObject(piLocalComputerObj); | ||
445 | ReleaseBSTR(bsPartitionsEnabledName); | ||
446 | ::VariantClear(&vtVal); | ||
447 | |||
448 | return hr; | ||
449 | } | ||
450 | |||
387 | static HRESULT CreatePartition( | 451 | static HRESULT CreatePartition( |
388 | CPI_PARTITION_ATTRIBUTES* pAttrs | 452 | CPI_PARTITION_ATTRIBUTES* pAttrs |
389 | ) | 453 | ) |
@@ -408,6 +472,9 @@ static HRESULT CreatePartition( | |||
408 | 472 | ||
409 | if (S_FALSE == hr) | 473 | if (S_FALSE == hr) |
410 | { | 474 | { |
475 | hr = CpiEnsurePartitionsEnabled(); | ||
476 | ExitOnFailure(hr, "Failed to enable partitions"); | ||
477 | |||
411 | // create partition | 478 | // create partition |
412 | hr = CpiAddCollectionObject(piPartColl, &piPartObj); | 479 | hr = CpiAddCollectionObject(piPartColl, &piPartObj); |
413 | ExitOnFailure(hr, "Failed to add partition to collection"); | 480 | ExitOnFailure(hr, "Failed to add partition to collection"); |
diff --git a/src/ext/ComPlus/ca/cppartroleexec.cpp b/src/ext/ComPlus/ca/cppartroleexec.cpp index 4a503c79..910473e0 100644 --- a/src/ext/ComPlus/ca/cppartroleexec.cpp +++ b/src/ext/ComPlus/ca/cppartroleexec.cpp | |||
@@ -49,7 +49,7 @@ HRESULT CpiConfigureUsersInPartitionRoles( | |||
49 | hr = CpiActionStartMessage(ppwzData, FALSE); | 49 | hr = CpiActionStartMessage(ppwzData, FALSE); |
50 | ExitOnFailure(hr, "Failed to send action start message"); | 50 | ExitOnFailure(hr, "Failed to send action start message"); |
51 | 51 | ||
52 | // ger count | 52 | // get count |
53 | int iCnt = 0; | 53 | int iCnt = 0; |
54 | hr = WcaReadIntegerFromCaData(ppwzData, &iCnt); | 54 | hr = WcaReadIntegerFromCaData(ppwzData, &iCnt); |
55 | ExitOnFailure(hr, "Failed to read count"); | 55 | ExitOnFailure(hr, "Failed to read count"); |
diff --git a/src/ext/ComPlus/ca/cppartrolesched.cpp b/src/ext/ComPlus/ca/cppartrolesched.cpp index 0ca4bf0c..b2fb5118 100644 --- a/src/ext/ComPlus/ca/cppartrolesched.cpp +++ b/src/ext/ComPlus/ca/cppartrolesched.cpp | |||
@@ -10,9 +10,9 @@ LPCWSTR vcsPartitionRoleQuery = | |||
10 | enum ePartitionRoleQuery { prqPartitionRole = 1, prqPartition, prqComponent, prqName }; | 10 | enum ePartitionRoleQuery { prqPartitionRole = 1, prqPartition, prqComponent, prqName }; |
11 | 11 | ||
12 | LPCWSTR vcsUserInPartitionRoleQuery = | 12 | LPCWSTR vcsUserInPartitionRoleQuery = |
13 | L"SELECT `UserInPartitionRole`, `PartitionRole_`, `ComPlusUserInPartitionRole`.`Component_`, `Domain`, `Name` FROM `Wix4ComPlusUserInPartitionRole`, `Wix4User` WHERE `User_` = `User`"; | 13 | L"SELECT `UserInPartitionRole`, `PartitionRole_`, `Wix4ComPlusUserInPartitionRole`.`Component_`, `Domain`, `Name` FROM `Wix4ComPlusUserInPartitionRole`, `Wix4User` WHERE `User_` = `User`"; |
14 | LPCWSTR vcsGroupInPartitionRoleQuery = | 14 | LPCWSTR vcsGroupInPartitionRoleQuery = |
15 | L"SELECT `GroupInPartitionRole`, `PartitionRole_`, `ComPlusGroupInPartitionRole`.`Component_`, `Domain`, `Name` FROM `Wix4ComPlusGroupInPartitionRole`, `Wix4Group` WHERE `Group_` = `Group`"; | 15 | L"SELECT `GroupInPartitionRole`, `PartitionRole_`, `Wix4ComPlusGroupInPartitionRole`.`Component_`, `Domain`, `Name` FROM `Wix4ComPlusGroupInPartitionRole`, `Wix4Group` WHERE `Group_` = `Group`"; |
16 | enum eTrusteeInPartitionRoleQuery { tiprqUserInPartitionRole = 1, tiprqPartitionRole, tiprqComponent, tiprqDomain, tiprqName }; | 16 | enum eTrusteeInPartitionRoleQuery { tiprqUserInPartitionRole = 1, tiprqPartitionRole, tiprqComponent, tiprqDomain, tiprqName }; |
17 | 17 | ||
18 | 18 | ||
diff --git a/src/ext/ComPlus/ca/cppartsched.cpp b/src/ext/ComPlus/ca/cppartsched.cpp index d4065d34..b4c1c314 100644 --- a/src/ext/ComPlus/ca/cppartsched.cpp +++ b/src/ext/ComPlus/ca/cppartsched.cpp | |||
@@ -13,7 +13,7 @@ LPCWSTR vcsPartitionPropertyQuery = | |||
13 | L"SELECT `Name`, `Value` FROM `Wix4ComPlusPartitionProperty` WHERE `Partition_` = ?"; | 13 | L"SELECT `Name`, `Value` FROM `Wix4ComPlusPartitionProperty` WHERE `Partition_` = ?"; |
14 | 14 | ||
15 | LPCWSTR vcsPartitionUserQuery = | 15 | LPCWSTR vcsPartitionUserQuery = |
16 | L"SELECT `PartitionUser`, `Partition_`, `ComPlusPartitionUser`.`Component_`, `Domain`, `Name` FROM `Wix4ComPlusPartitionUser`, `Wix4User` WHERE `User_` = `User`"; | 16 | L"SELECT `PartitionUser`, `Partition_`, `Wix4ComPlusPartitionUser`.`Component_`, `Domain`, `Name` FROM `Wix4ComPlusPartitionUser`, `Wix4User` WHERE `User_` = `User`"; |
17 | enum ePartitionUserQuery { puqPartitionUser = 1, puqPartition, puqComponent, puqDomain, puqName }; | 17 | enum ePartitionUserQuery { puqPartitionUser = 1, puqPartition, puqComponent, puqDomain, puqName }; |
18 | 18 | ||
19 | 19 | ||
@@ -192,7 +192,7 @@ HRESULT CpiPartitionsVerifyInstall( | |||
192 | if (!pItm->fReferencedForInstall && !(pItm->fHasComponent && WcaIsInstalling(pItm->isInstalled, pItm->isAction))) | 192 | if (!pItm->fReferencedForInstall && !(pItm->fHasComponent && WcaIsInstalling(pItm->isInstalled, pItm->isAction))) |
193 | continue; | 193 | continue; |
194 | 194 | ||
195 | // if the partition is referensed and is not a locater, it must be installed | 195 | // if the partition is referenced and is not a locater, it must be installed |
196 | if (pItm->fReferencedForInstall && pItm->fHasComponent && !CpiWillBeInstalled(pItm->isInstalled, pItm->isAction)) | 196 | if (pItm->fReferencedForInstall && pItm->fHasComponent && !CpiWillBeInstalled(pItm->isInstalled, pItm->isAction)) |
197 | MessageExitOnFailure(hr = E_FAIL, msierrComPlusPartitionDependency, "A partition is used by another entity being installed, but is not installed itself, key: %S", pItm->wzKey); | 197 | MessageExitOnFailure(hr = E_FAIL, msierrComPlusPartitionDependency, "A partition is used by another entity being installed, but is not installed itself, key: %S", pItm->wzKey); |
198 | 198 | ||
@@ -281,7 +281,7 @@ HRESULT CpiPartitionsVerifyInstall( | |||
281 | { | 281 | { |
282 | case IDCANCEL: | 282 | case IDCANCEL: |
283 | case IDABORT: | 283 | case IDABORT: |
284 | ExitOnFailure(hr = E_FAIL, "A partition with a conflictiong name or id exists, key: %S", pItm->wzKey); | 284 | ExitOnFailure(hr = E_FAIL, "A partition with a conflicting name or id exists, key: %S", pItm->wzKey); |
285 | break; | 285 | break; |
286 | case IDRETRY: | 286 | case IDRETRY: |
287 | break; | 287 | break; |
@@ -403,7 +403,7 @@ HRESULT CpiPartitionsInstall( | |||
403 | int iActionType; | 403 | int iActionType; |
404 | 404 | ||
405 | // add action text | 405 | // add action text |
406 | hr = CpiAddActionTextToActionData(L"CreateComPlusPartitions", ppwzActionData); | 406 | hr = CpiAddActionTextToActionData(CUSTOM_ACTION_DECORATION(L"CreateComPlusPartitions"), ppwzActionData); |
407 | ExitOnFailure(hr, "Failed to add action text to custom action data"); | 407 | ExitOnFailure(hr, "Failed to add action text to custom action data"); |
408 | 408 | ||
409 | // add partition count to action data | 409 | // add partition count to action data |
@@ -455,7 +455,7 @@ HRESULT CpiPartitionsUninstall( | |||
455 | int iActionType; | 455 | int iActionType; |
456 | 456 | ||
457 | // add action text | 457 | // add action text |
458 | hr = CpiAddActionTextToActionData(L"RemoveComPlusPartitions", ppwzActionData); | 458 | hr = CpiAddActionTextToActionData(CUSTOM_ACTION_DECORATION(L"RemoveComPlusPartitions"), ppwzActionData); |
459 | ExitOnFailure(hr, "Failed to add action text to custom action data"); | 459 | ExitOnFailure(hr, "Failed to add action text to custom action data"); |
460 | 460 | ||
461 | // add partition count to action data | 461 | // add partition count to action data |
@@ -735,7 +735,7 @@ HRESULT CpiPartitionUsersInstall( | |||
735 | int iActionType; | 735 | int iActionType; |
736 | 736 | ||
737 | // add action text | 737 | // add action text |
738 | hr = CpiAddActionTextToActionData(L"AddComPlusPartitionUsers", ppwzActionData); | 738 | hr = CpiAddActionTextToActionData(CUSTOM_ACTION_DECORATION(L"AddComPlusPartitionUsers"), ppwzActionData); |
739 | ExitOnFailure(hr, "Failed to add action text to custom action data"); | 739 | ExitOnFailure(hr, "Failed to add action text to custom action data"); |
740 | 740 | ||
741 | // add partition count to action data | 741 | // add partition count to action data |
@@ -787,7 +787,7 @@ HRESULT CpiPartitionUsersUninstall( | |||
787 | int iActionType; | 787 | int iActionType; |
788 | 788 | ||
789 | // add action text | 789 | // add action text |
790 | hr = CpiAddActionTextToActionData(L"RemoveComPlusPartitionUsers", ppwzActionData); | 790 | hr = CpiAddActionTextToActionData(CUSTOM_ACTION_DECORATION(L"RemoveComPlusPartitionUsers"), ppwzActionData); |
791 | ExitOnFailure(hr, "Failed to add action text to custom action data"); | 791 | ExitOnFailure(hr, "Failed to add action text to custom action data"); |
792 | 792 | ||
793 | // add partition count to action data | 793 | // add partition count to action data |
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) |
diff --git a/src/ext/ComPlus/ca/cpsubsexec.cpp b/src/ext/ComPlus/ca/cpsubsexec.cpp index bbcf9853..ab32b856 100644 --- a/src/ext/ComPlus/ca/cpsubsexec.cpp +++ b/src/ext/ComPlus/ca/cpsubsexec.cpp | |||
@@ -54,7 +54,7 @@ HRESULT CpiConfigureSubscriptions( | |||
54 | hr = CpiActionStartMessage(ppwzData, FALSE); | 54 | hr = CpiActionStartMessage(ppwzData, FALSE); |
55 | ExitOnFailure(hr, "Failed to send action start message"); | 55 | ExitOnFailure(hr, "Failed to send action start message"); |
56 | 56 | ||
57 | // ger count | 57 | // get count |
58 | int iCnt = 0; | 58 | int iCnt = 0; |
59 | hr = WcaReadIntegerFromCaData(ppwzData, &iCnt); | 59 | hr = WcaReadIntegerFromCaData(ppwzData, &iCnt); |
60 | ExitOnFailure(hr, "Failed to read count"); | 60 | ExitOnFailure(hr, "Failed to read count"); |
@@ -127,7 +127,7 @@ HRESULT CpiRollbackConfigureSubscriptions( | |||
127 | hr = CpiActionStartMessage(ppwzData, NULL == pRollbackDataList); | 127 | hr = CpiActionStartMessage(ppwzData, NULL == pRollbackDataList); |
128 | ExitOnFailure(hr, "Failed to send action start message"); | 128 | ExitOnFailure(hr, "Failed to send action start message"); |
129 | 129 | ||
130 | // ger count | 130 | // get count |
131 | int iCnt = 0; | 131 | int iCnt = 0; |
132 | hr = WcaReadIntegerFromCaData(ppwzData, &iCnt); | 132 | hr = WcaReadIntegerFromCaData(ppwzData, &iCnt); |
133 | ExitOnFailure(hr, "Failed to read count"); | 133 | ExitOnFailure(hr, "Failed to read count"); |
diff --git a/src/ext/ComPlus/ca/cputilsched.cpp b/src/ext/ComPlus/ca/cputilsched.cpp index 4a2fdfc6..760b5ec9 100644 --- a/src/ext/ComPlus/ca/cputilsched.cpp +++ b/src/ext/ComPlus/ca/cputilsched.cpp | |||
@@ -53,31 +53,31 @@ void CpiSchedInitialize() | |||
53 | // tables | 53 | // tables |
54 | giTables = 0; | 54 | giTables = 0; |
55 | 55 | ||
56 | if (S_OK == WcaTableExists(L"ComPlusPartition")) giTables |= cptComPlusPartition; | 56 | if (S_OK == WcaTableExists(L"Wix4ComPlusPartition")) giTables |= cptComPlusPartition; |
57 | if (S_OK == WcaTableExists(L"ComPlusPartitionProperty")) giTables |= cptComPlusPartitionProperty; | 57 | if (S_OK == WcaTableExists(L"Wix4ComPlusPartitionProperty")) giTables |= cptComPlusPartitionProperty; |
58 | if (S_OK == WcaTableExists(L"ComPlusPartitionRole")) giTables |= cptComPlusPartitionRole; | 58 | if (S_OK == WcaTableExists(L"Wix4ComPlusPartitionRole")) giTables |= cptComPlusPartitionRole; |
59 | if (S_OK == WcaTableExists(L"ComPlusUserInPartitionRole")) giTables |= cptComPlusUserInPartitionRole; | 59 | if (S_OK == WcaTableExists(L"Wix4ComPlusUserInPartitionRole")) giTables |= cptComPlusUserInPartitionRole; |
60 | if (S_OK == WcaTableExists(L"ComPlusGroupInPartitionRole")) giTables |= cptComPlusGroupInPartitionRole; | 60 | if (S_OK == WcaTableExists(L"Wix4ComPlusGroupInPartitionRole")) giTables |= cptComPlusGroupInPartitionRole; |
61 | if (S_OK == WcaTableExists(L"ComPlusPartitionUser")) giTables |= cptComPlusPartitionUser; | 61 | if (S_OK == WcaTableExists(L"Wix4ComPlusPartitionUser")) giTables |= cptComPlusPartitionUser; |
62 | if (S_OK == WcaTableExists(L"ComPlusApplication")) giTables |= cptComPlusApplication; | 62 | if (S_OK == WcaTableExists(L"Wix4ComPlusApplication")) giTables |= cptComPlusApplication; |
63 | if (S_OK == WcaTableExists(L"ComPlusApplicationProperty")) giTables |= cptComPlusApplicationProperty; | 63 | if (S_OK == WcaTableExists(L"Wix4ComPlusApplicationProperty")) giTables |= cptComPlusApplicationProperty; |
64 | if (S_OK == WcaTableExists(L"ComPlusApplicationRole")) giTables |= cptComPlusApplicationRole; | 64 | if (S_OK == WcaTableExists(L"Wix4ComPlusApplicationRole")) giTables |= cptComPlusApplicationRole; |
65 | if (S_OK == WcaTableExists(L"ComPlusApplicationRoleProperty")) giTables |= cptComPlusApplicationRoleProperty; | 65 | if (S_OK == WcaTableExists(L"Wix4ComPlusAppRoleProperty")) giTables |= cptComPlusApplicationRoleProperty; |
66 | if (S_OK == WcaTableExists(L"ComPlusUserInApplicationRole")) giTables |= cptComPlusUserInApplicationRole; | 66 | if (S_OK == WcaTableExists(L"Wix4ComPlusUserInAppRole")) giTables |= cptComPlusUserInApplicationRole; |
67 | if (S_OK == WcaTableExists(L"ComPlusGroupInApplicationRole")) giTables |= cptComPlusGroupInApplicationRole; | 67 | if (S_OK == WcaTableExists(L"Wix4ComPlusGroupInAppRole")) giTables |= cptComPlusGroupInApplicationRole; |
68 | if (S_OK == WcaTableExists(L"ComPlusAssembly")) giTables |= cptComPlusAssembly; | 68 | if (S_OK == WcaTableExists(L"Wix4ComPlusAssembly")) giTables |= cptComPlusAssembly; |
69 | if (S_OK == WcaTableExists(L"ComPlusAssemblyDependency")) giTables |= cptComPlusAssemblyDependency; | 69 | if (S_OK == WcaTableExists(L"Wix4ComPlusAssemblyDependency")) giTables |= cptComPlusAssemblyDependency; |
70 | if (S_OK == WcaTableExists(L"ComPlusComponent")) giTables |= cptComPlusComponent; | 70 | if (S_OK == WcaTableExists(L"Wix4ComPlusComponent")) giTables |= cptComPlusComponent; |
71 | if (S_OK == WcaTableExists(L"ComPlusComponentProperty")) giTables |= cptComPlusComponentProperty; | 71 | if (S_OK == WcaTableExists(L"Wix4ComPlusComponentProperty")) giTables |= cptComPlusComponentProperty; |
72 | if (S_OK == WcaTableExists(L"ComPlusRoleForComponent")) giTables |= cptComPlusRoleForComponent; | 72 | if (S_OK == WcaTableExists(L"Wix4ComPlusRoleForComponent")) giTables |= cptComPlusRoleForComponent; |
73 | if (S_OK == WcaTableExists(L"ComPlusInterface")) giTables |= cptComPlusInterface; | 73 | if (S_OK == WcaTableExists(L"Wix4ComPlusInterface")) giTables |= cptComPlusInterface; |
74 | if (S_OK == WcaTableExists(L"ComPlusInterfaceProperty")) giTables |= cptComPlusInterfaceProperty; | 74 | if (S_OK == WcaTableExists(L"Wix4ComPlusInterfaceProperty")) giTables |= cptComPlusInterfaceProperty; |
75 | if (S_OK == WcaTableExists(L"ComPlusRoleForInterface")) giTables |= cptComPlusRoleForInterface; | 75 | if (S_OK == WcaTableExists(L"Wix4ComPlusRoleForInterface")) giTables |= cptComPlusRoleForInterface; |
76 | if (S_OK == WcaTableExists(L"ComPlusMethod")) giTables |= cptComPlusMethod; | 76 | if (S_OK == WcaTableExists(L"Wix4ComPlusMethod")) giTables |= cptComPlusMethod; |
77 | if (S_OK == WcaTableExists(L"ComPlusMethodProperty")) giTables |= cptComPlusMethodProperty; | 77 | if (S_OK == WcaTableExists(L"Wix4ComPlusMethodProperty")) giTables |= cptComPlusMethodProperty; |
78 | if (S_OK == WcaTableExists(L"ComPlusRoleForMethod")) giTables |= cptComPlusRoleForMethod; | 78 | if (S_OK == WcaTableExists(L"Wix4ComPlusRoleForMethod")) giTables |= cptComPlusRoleForMethod; |
79 | if (S_OK == WcaTableExists(L"ComPlusSubscription")) giTables |= cptComPlusSubscription; | 79 | if (S_OK == WcaTableExists(L"Wix4ComPlusSubscription")) giTables |= cptComPlusSubscription; |
80 | if (S_OK == WcaTableExists(L"ComPlusSubscriptionProperty")) giTables |= cptComPlusSubscriptionProperty; | 80 | if (S_OK == WcaTableExists(L"Wix4ComPlusSubscriptionProperty")) giTables |= cptComPlusSubscriptionProperty; |
81 | } | 81 | } |
82 | 82 | ||
83 | void CpiSchedFinalize() | 83 | void CpiSchedFinalize() |
@@ -137,7 +137,7 @@ HRESULT CpiSchedGetCatalogCollection( | |||
137 | hr = CpiSchedGetAdminCatalog(&piCatalog); | 137 | hr = CpiSchedGetAdminCatalog(&piCatalog); |
138 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); | 138 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); |
139 | 139 | ||
140 | // get collecton from catalog | 140 | // get collection from catalog |
141 | hr = piCatalog->GetCollection(bstrName, &piDisp); | 141 | hr = piCatalog->GetCollection(bstrName, &piDisp); |
142 | ExitOnFailure(hr, "Failed to get collection"); | 142 | ExitOnFailure(hr, "Failed to get collection"); |
143 | 143 | ||
diff --git a/src/ext/ComPlus/ca/precomp.h b/src/ext/ComPlus/ca/precomp.h index 74c328d2..97aa8e97 100644 --- a/src/ext/ComPlus/ca/precomp.h +++ b/src/ext/ComPlus/ca/precomp.h | |||
@@ -31,3 +31,5 @@ | |||
31 | #include "cpapprolesched.h" | 31 | #include "cpapprolesched.h" |
32 | #include "cpasmsched.h" | 32 | #include "cpasmsched.h" |
33 | #include "cpsubssched.h" | 33 | #include "cpsubssched.h" |
34 | |||
35 | #include "..\..\caDecor.h" | ||
diff --git a/src/ext/ComPlus/wixext/ComPlusTableDefinitions.cs b/src/ext/ComPlus/wixext/ComPlusTableDefinitions.cs index 6af5045c..cffaff0d 100644 --- a/src/ext/ComPlus/wixext/ComPlusTableDefinitions.cs +++ b/src/ext/ComPlus/wixext/ComPlusTableDefinitions.cs | |||
@@ -123,7 +123,7 @@ namespace WixToolset.ComPlus | |||
123 | ); | 123 | ); |
124 | 124 | ||
125 | public static readonly TableDefinition ComPlusApplicationRoleProperty = new TableDefinition( | 125 | public static readonly TableDefinition ComPlusApplicationRoleProperty = new TableDefinition( |
126 | "Wix4ComPlusApplicationRoleProperty", | 126 | "Wix4ComPlusAppRoleProperty", |
127 | ComPlusSymbolDefinitions.ComPlusApplicationRoleProperty, | 127 | ComPlusSymbolDefinitions.ComPlusApplicationRoleProperty, |
128 | new[] | 128 | new[] |
129 | { | 129 | { |
@@ -135,7 +135,7 @@ namespace WixToolset.ComPlus | |||
135 | ); | 135 | ); |
136 | 136 | ||
137 | public static readonly TableDefinition ComPlusUserInApplicationRole = new TableDefinition( | 137 | public static readonly TableDefinition ComPlusUserInApplicationRole = new TableDefinition( |
138 | "Wix4ComPlusUserInApplicationRole", | 138 | "Wix4ComPlusUserInAppRole", |
139 | ComPlusSymbolDefinitions.ComPlusUserInApplicationRole, | 139 | ComPlusSymbolDefinitions.ComPlusUserInApplicationRole, |
140 | new[] | 140 | new[] |
141 | { | 141 | { |
@@ -148,7 +148,7 @@ namespace WixToolset.ComPlus | |||
148 | ); | 148 | ); |
149 | 149 | ||
150 | public static readonly TableDefinition ComPlusGroupInApplicationRole = new TableDefinition( | 150 | public static readonly TableDefinition ComPlusGroupInApplicationRole = new TableDefinition( |
151 | "Wix4ComPlusGroupInApplicationRole", | 151 | "Wix4ComPlusGroupInAppRole", |
152 | ComPlusSymbolDefinitions.ComPlusGroupInApplicationRole, | 152 | ComPlusSymbolDefinitions.ComPlusGroupInApplicationRole, |
153 | new[] | 153 | new[] |
154 | { | 154 | { |
diff --git a/src/internal/SetBuildNumber/Directory.Packages.props.pp b/src/internal/SetBuildNumber/Directory.Packages.props.pp index 552aab87..4085568f 100644 --- a/src/internal/SetBuildNumber/Directory.Packages.props.pp +++ b/src/internal/SetBuildNumber/Directory.Packages.props.pp | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | <PackageVersion Include="WixToolset.Bal.wixext" Version="{packageversion}" /> | 34 | <PackageVersion Include="WixToolset.Bal.wixext" Version="{packageversion}" /> |
35 | <PackageVersion Include="WixToolset.BootstrapperApplications.wixext" Version="{packageversion}" /> | 35 | <PackageVersion Include="WixToolset.BootstrapperApplications.wixext" Version="{packageversion}" /> |
36 | <PackageVersion Include="WixToolset.ComPlus.wixext" Version="{packageversion}" /> | ||
36 | <PackageVersion Include="WixToolset.Dependency.wixext" Version="{packageversion}" /> | 37 | <PackageVersion Include="WixToolset.Dependency.wixext" Version="{packageversion}" /> |
37 | <PackageVersion Include="WixToolset.NetFx.wixext" Version="{packageversion}" /> | 38 | <PackageVersion Include="WixToolset.NetFx.wixext" Version="{packageversion}" /> |
38 | <PackageVersion Include="WixToolset.UI.wixext" Version="{packageversion}" /> | 39 | <PackageVersion Include="WixToolset.UI.wixext" Version="{packageversion}" /> |
diff --git a/src/test/burn/WixTestTools/RuntimeFactAttribute.cs b/src/test/burn/WixTestTools/RuntimeFactAttribute.cs index f73c87a2..573a9de2 100644 --- a/src/test/burn/WixTestTools/RuntimeFactAttribute.cs +++ b/src/test/burn/WixTestTools/RuntimeFactAttribute.cs | |||
@@ -5,6 +5,7 @@ namespace WixTestTools | |||
5 | using System; | 5 | using System; |
6 | using System.Security.Principal; | 6 | using System.Security.Principal; |
7 | using WixInternal.TestSupport.XunitExtensions; | 7 | using WixInternal.TestSupport.XunitExtensions; |
8 | using System.Runtime.InteropServices; | ||
8 | 9 | ||
9 | public class RuntimeFactAttribute : SkippableFactAttribute | 10 | public class RuntimeFactAttribute : SkippableFactAttribute |
10 | { | 11 | { |
@@ -12,6 +13,16 @@ namespace WixTestTools | |||
12 | 13 | ||
13 | public static bool RuntimeTestsEnabled { get; } | 14 | public static bool RuntimeTestsEnabled { get; } |
14 | public static bool RunningAsAdministrator { get; } | 15 | public static bool RunningAsAdministrator { get; } |
16 | public static bool RunningOnWindowsServer { get; } | ||
17 | |||
18 | [DllImport("shlwapi.dll", SetLastError = true, EntryPoint = "#437")] | ||
19 | private static extern bool IsOS(int os); | ||
20 | private static bool IsWindowsServer() | ||
21 | { | ||
22 | const int OS_ANYSERVER = 29; | ||
23 | return IsOS(OS_ANYSERVER); | ||
24 | } | ||
25 | |||
15 | 26 | ||
16 | static RuntimeFactAttribute() | 27 | static RuntimeFactAttribute() |
17 | { | 28 | { |
@@ -21,6 +32,25 @@ namespace WixTestTools | |||
21 | 32 | ||
22 | var testsEnabledString = Environment.GetEnvironmentVariable(RequiredEnvironmentVariableName); | 33 | var testsEnabledString = Environment.GetEnvironmentVariable(RequiredEnvironmentVariableName); |
23 | RuntimeTestsEnabled = Boolean.TryParse(testsEnabledString, out var testsEnabled) && testsEnabled; | 34 | RuntimeTestsEnabled = Boolean.TryParse(testsEnabledString, out var testsEnabled) && testsEnabled; |
35 | |||
36 | RunningOnWindowsServer = IsWindowsServer(); | ||
37 | } | ||
38 | |||
39 | private bool _RequireWindowsServer; | ||
40 | public bool RequireWindowsServer | ||
41 | { | ||
42 | get | ||
43 | { | ||
44 | return _RequireWindowsServer; | ||
45 | } | ||
46 | set | ||
47 | { | ||
48 | _RequireWindowsServer = value; | ||
49 | if (_RequireWindowsServer && !RunningOnWindowsServer) | ||
50 | { | ||
51 | this.Skip = $"These tests are only run on Windows Server"; | ||
52 | } | ||
53 | } | ||
24 | } | 54 | } |
25 | 55 | ||
26 | public RuntimeFactAttribute() | 56 | public RuntimeFactAttribute() |
diff --git a/src/test/msi/TestData/ComPlusExtensionTests/Components/TestComponentNET3.dll b/src/test/msi/TestData/ComPlusExtensionTests/Components/TestComponentNET3.dll new file mode 100644 index 00000000..b46be649 --- /dev/null +++ b/src/test/msi/TestData/ComPlusExtensionTests/Components/TestComponentNET3.dll | |||
Binary files differ | |||
diff --git a/src/test/msi/TestData/ComPlusExtensionTests/Components/TestComponentNET3.tlb b/src/test/msi/TestData/ComPlusExtensionTests/Components/TestComponentNET3.tlb new file mode 100644 index 00000000..87419ee1 --- /dev/null +++ b/src/test/msi/TestData/ComPlusExtensionTests/Components/TestComponentNET3.tlb | |||
Binary files differ | |||
diff --git a/src/test/msi/TestData/ComPlusExtensionTests/Components/TestComponentNET4.dll b/src/test/msi/TestData/ComPlusExtensionTests/Components/TestComponentNET4.dll new file mode 100644 index 00000000..e0fd3dee --- /dev/null +++ b/src/test/msi/TestData/ComPlusExtensionTests/Components/TestComponentNET4.dll | |||
Binary files differ | |||
diff --git a/src/test/msi/TestData/ComPlusExtensionTests/Components/TestComponentNET4.tlb b/src/test/msi/TestData/ComPlusExtensionTests/Components/TestComponentNET4.tlb new file mode 100644 index 00000000..63647bdc --- /dev/null +++ b/src/test/msi/TestData/ComPlusExtensionTests/Components/TestComponentNET4.tlb | |||
Binary files differ | |||
diff --git a/src/test/msi/TestData/ComPlusExtensionTests/Components/TestComponentNative.dll b/src/test/msi/TestData/ComPlusExtensionTests/Components/TestComponentNative.dll new file mode 100644 index 00000000..dbcb5807 --- /dev/null +++ b/src/test/msi/TestData/ComPlusExtensionTests/Components/TestComponentNative.dll | |||
Binary files differ | |||
diff --git a/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNET3WithoutPartitions/InstallUninstallNET3WithoutPartitions.wixproj b/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNET3WithoutPartitions/InstallUninstallNET3WithoutPartitions.wixproj new file mode 100644 index 00000000..19382c83 --- /dev/null +++ b/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNET3WithoutPartitions/InstallUninstallNET3WithoutPartitions.wixproj | |||
@@ -0,0 +1,15 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
3 | <Project Sdk="WixToolset.Sdk"> | ||
4 | <PropertyGroup> | ||
5 | <UpgradeCode>{A3E0B539-63F9-4B43-9E34-F33AE1C6E06D}</UpgradeCode> | ||
6 | <ProductComponentsRef>true</ProductComponentsRef> | ||
7 | </PropertyGroup> | ||
8 | <ItemGroup> | ||
9 | <Compile Include="..\..\Templates\Product.wxs" Link="Product.wxs" /> | ||
10 | </ItemGroup> | ||
11 | <ItemGroup> | ||
12 | <PackageReference Include="WixToolset.Util.wixext" /> | ||
13 | <PackageReference Include="WixToolset.ComPlus.wixext" /> | ||
14 | </ItemGroup> | ||
15 | </Project> | ||
diff --git a/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNET3WithoutPartitions/product.wxs b/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNET3WithoutPartitions/product.wxs new file mode 100644 index 00000000..129669cc --- /dev/null +++ b/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNET3WithoutPartitions/product.wxs | |||
@@ -0,0 +1,24 @@ | |||
1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
2 | |||
3 | |||
4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" | ||
5 | xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util" | ||
6 | xmlns:complus="http://wixtoolset.org/schemas/v4/wxs/complus"> | ||
7 | <Fragment> | ||
8 | <ComponentGroup Id="ProductComponents"> | ||
9 | <ComponentRef Id="Component1" /> | ||
10 | </ComponentGroup> | ||
11 | </Fragment> | ||
12 | |||
13 | <Fragment> | ||
14 | <Component Id="Component1" Guid="09624A9A-4BBC-4126-BBF9-0713C5217DB1" Directory="INSTALLFOLDER"> | ||
15 | <File Id="AssemblyFileNET" Source="../Components/TestComponentNET3.dll" KeyPath="yes" /> | ||
16 | <File Id="TlbFileNET" Source="../Components/TestComponentNET3.tlb" /> | ||
17 | <complus:ComPlusApplication Id="APPLICATION" Name="ComPlus .NET 3 Application" Description="ComPlus Application" > | ||
18 | <complus:ComPlusAssembly Id="ASSEMBLY_NET" Type=".net" DllPath="[#AssemblyFileNET]" TlbPath="[#TlbFileNET]" > | ||
19 | <complus:ComPlusComponent Id="MyComNET3" CLSID="17F82C39-5433-493A-A396-36072C645B80" /> | ||
20 | </complus:ComPlusAssembly> | ||
21 | </complus:ComPlusApplication> | ||
22 | </Component> | ||
23 | </Fragment> | ||
24 | </Wix> | ||
diff --git a/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNET4WithoutPartitions/InstallUninstallNET4WithoutPartitions.wixproj b/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNET4WithoutPartitions/InstallUninstallNET4WithoutPartitions.wixproj new file mode 100644 index 00000000..19382c83 --- /dev/null +++ b/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNET4WithoutPartitions/InstallUninstallNET4WithoutPartitions.wixproj | |||
@@ -0,0 +1,15 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
3 | <Project Sdk="WixToolset.Sdk"> | ||
4 | <PropertyGroup> | ||
5 | <UpgradeCode>{A3E0B539-63F9-4B43-9E34-F33AE1C6E06D}</UpgradeCode> | ||
6 | <ProductComponentsRef>true</ProductComponentsRef> | ||
7 | </PropertyGroup> | ||
8 | <ItemGroup> | ||
9 | <Compile Include="..\..\Templates\Product.wxs" Link="Product.wxs" /> | ||
10 | </ItemGroup> | ||
11 | <ItemGroup> | ||
12 | <PackageReference Include="WixToolset.Util.wixext" /> | ||
13 | <PackageReference Include="WixToolset.ComPlus.wixext" /> | ||
14 | </ItemGroup> | ||
15 | </Project> | ||
diff --git a/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNET4WithoutPartitions/product.wxs b/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNET4WithoutPartitions/product.wxs new file mode 100644 index 00000000..eabd7794 --- /dev/null +++ b/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNET4WithoutPartitions/product.wxs | |||
@@ -0,0 +1,24 @@ | |||
1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
2 | |||
3 | |||
4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" | ||
5 | xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util" | ||
6 | xmlns:complus="http://wixtoolset.org/schemas/v4/wxs/complus"> | ||
7 | <Fragment> | ||
8 | <ComponentGroup Id="ProductComponents"> | ||
9 | <ComponentRef Id="Component1" /> | ||
10 | </ComponentGroup> | ||
11 | </Fragment> | ||
12 | |||
13 | <Fragment> | ||
14 | <Component Id="Component1" Guid="09624A9A-4BBC-4126-BBF9-0713C5217DB1" Directory="INSTALLFOLDER"> | ||
15 | <File Id="AssemblyFileNET" Source="../Components/TestComponentNET4.dll" KeyPath="yes" /> | ||
16 | <File Id="TlbFileNET" Source="../Components/TestComponentNET4.tlb" /> | ||
17 | <complus:ComPlusApplication Id="APPLICATION" Name="ComPlus .NET 4 Application" Description="ComPlus Application" > | ||
18 | <complus:ComPlusAssembly Id="ASSEMBLY_NET" Type=".net" DllPath="[#AssemblyFileNET]" TlbPath="[#TlbFileNET]" > | ||
19 | <complus:ComPlusComponent Id="MyComNET4" CLSID="146AB3A2-4472-4DB9-94D5-311536E799BD" /> | ||
20 | </complus:ComPlusAssembly> | ||
21 | </complus:ComPlusApplication> | ||
22 | </Component> | ||
23 | </Fragment> | ||
24 | </Wix> | ||
diff --git a/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNativeWithoutPartitions/InstallUninstallNativeWithoutPartitions.wixproj b/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNativeWithoutPartitions/InstallUninstallNativeWithoutPartitions.wixproj new file mode 100644 index 00000000..19382c83 --- /dev/null +++ b/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNativeWithoutPartitions/InstallUninstallNativeWithoutPartitions.wixproj | |||
@@ -0,0 +1,15 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
3 | <Project Sdk="WixToolset.Sdk"> | ||
4 | <PropertyGroup> | ||
5 | <UpgradeCode>{A3E0B539-63F9-4B43-9E34-F33AE1C6E06D}</UpgradeCode> | ||
6 | <ProductComponentsRef>true</ProductComponentsRef> | ||
7 | </PropertyGroup> | ||
8 | <ItemGroup> | ||
9 | <Compile Include="..\..\Templates\Product.wxs" Link="Product.wxs" /> | ||
10 | </ItemGroup> | ||
11 | <ItemGroup> | ||
12 | <PackageReference Include="WixToolset.Util.wixext" /> | ||
13 | <PackageReference Include="WixToolset.ComPlus.wixext" /> | ||
14 | </ItemGroup> | ||
15 | </Project> | ||
diff --git a/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNativeWithoutPartitions/product.wxs b/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNativeWithoutPartitions/product.wxs new file mode 100644 index 00000000..ee3c4d8f --- /dev/null +++ b/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallNativeWithoutPartitions/product.wxs | |||
@@ -0,0 +1,24 @@ | |||
1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
2 | |||
3 | |||
4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" | ||
5 | xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util" | ||
6 | xmlns:complus="http://wixtoolset.org/schemas/v4/wxs/complus"> | ||
7 | <Fragment> | ||
8 | <ComponentGroup Id="ProductComponents"> | ||
9 | <ComponentRef Id="Component1" /> | ||
10 | </ComponentGroup> | ||
11 | </Fragment> | ||
12 | |||
13 | <Fragment> | ||
14 | <Component Id="Component1" Guid="09624A9A-4BBC-4126-BBF9-0713C5217DB1" Directory="INSTALLFOLDER"> | ||
15 | <File Id="AssemblyFileNative" Source="../Components/TestComponentNative.dll" /> | ||
16 | |||
17 | <complus:ComPlusApplication Id="APPLICATION" Name="ComPlus Native Application" Description="ComPlus Native Application" > | ||
18 | <complus:ComPlusAssembly Id="ASSEMBLY_Native" Type="native" DllPath="[#AssemblyFileNative]" > | ||
19 | <complus:ComPlusComponent Id="MyComNative" CLSID="8b4c3a90-762c-465b-abc5-81cb3cc5e464" /> | ||
20 | </complus:ComPlusAssembly> | ||
21 | </complus:ComPlusApplication> | ||
22 | </Component> | ||
23 | </Fragment> | ||
24 | </Wix> | ||
diff --git a/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallWithPartitions/InstallUninstallWithPartitions.wixproj b/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallWithPartitions/InstallUninstallWithPartitions.wixproj new file mode 100644 index 00000000..19382c83 --- /dev/null +++ b/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallWithPartitions/InstallUninstallWithPartitions.wixproj | |||
@@ -0,0 +1,15 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
3 | <Project Sdk="WixToolset.Sdk"> | ||
4 | <PropertyGroup> | ||
5 | <UpgradeCode>{A3E0B539-63F9-4B43-9E34-F33AE1C6E06D}</UpgradeCode> | ||
6 | <ProductComponentsRef>true</ProductComponentsRef> | ||
7 | </PropertyGroup> | ||
8 | <ItemGroup> | ||
9 | <Compile Include="..\..\Templates\Product.wxs" Link="Product.wxs" /> | ||
10 | </ItemGroup> | ||
11 | <ItemGroup> | ||
12 | <PackageReference Include="WixToolset.Util.wixext" /> | ||
13 | <PackageReference Include="WixToolset.ComPlus.wixext" /> | ||
14 | </ItemGroup> | ||
15 | </Project> | ||
diff --git a/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallWithPartitions/product.wxs b/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallWithPartitions/product.wxs new file mode 100644 index 00000000..92dc892b --- /dev/null +++ b/src/test/msi/TestData/ComPlusExtensionTests/InstallUninstallWithPartitions/product.wxs | |||
@@ -0,0 +1,30 @@ | |||
1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
2 | |||
3 | |||
4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" | ||
5 | xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util" | ||
6 | xmlns:complus="http://wixtoolset.org/schemas/v4/wxs/complus"> | ||
7 | <Fragment> | ||
8 | <ComponentGroup Id="ProductComponents"> | ||
9 | <ComponentRef Id="Component1" /> | ||
10 | </ComponentGroup> | ||
11 | </Fragment> | ||
12 | |||
13 | <Fragment> | ||
14 | <util:User Id="TEST_USER" Name="[LogonUser]" /> | ||
15 | |||
16 | <Component Id="Component1" Guid="09624A9A-4BBC-4126-BBF9-0713C5217DB1" Directory="INSTALLFOLDER"> | ||
17 | <File Id="AssemblyFileNative" Source="../Components/TestComponentNative.dll" /> | ||
18 | |||
19 | <!-- Partition testing only works on Server OS --> | ||
20 | <complus:ComPlusPartition Id="PARTITION" Name="Complus Partition1" Description="ComPlus Partition" > | ||
21 | <complus:ComPlusPartitionUser Id="PARTITION_USER" User ="TEST_USER"/> | ||
22 | <complus:ComPlusApplication Id="APPLICATION" Name="ComPlus Application" Description="ComPlus Application" > | ||
23 | <complus:ComPlusAssembly Id="ASSEMBLY_Native" Type="native" DllPath="[#AssemblyFileNative]" > | ||
24 | <complus:ComPlusComponent Id="MyComNative" CLSID="8b4c3a90-762c-465b-abc5-81cb3cc5e464" /> | ||
25 | </complus:ComPlusAssembly> | ||
26 | </complus:ComPlusApplication> | ||
27 | </complus:ComPlusPartition> | ||
28 | </Component> | ||
29 | </Fragment> | ||
30 | </Wix> | ||
diff --git a/src/test/msi/WixToolsetTest.MsiE2E/ComPlusExtensionTests.cs b/src/test/msi/WixToolsetTest.MsiE2E/ComPlusExtensionTests.cs new file mode 100644 index 00000000..b143c19d --- /dev/null +++ b/src/test/msi/WixToolsetTest.MsiE2E/ComPlusExtensionTests.cs | |||
@@ -0,0 +1,50 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolsetTest.MsiE2E | ||
4 | { | ||
5 | using System; | ||
6 | using WixTestTools; | ||
7 | using Xunit; | ||
8 | using Xunit.Abstractions; | ||
9 | |||
10 | public class ComPlusExtensionTests : MsiE2ETests | ||
11 | { | ||
12 | public ComPlusExtensionTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | ||
13 | |||
14 | [RuntimeFact] | ||
15 | public void CanInstallUninstallNativeWithoutPartitions() | ||
16 | { | ||
17 | var product = this.CreatePackageInstaller("InstallUninstallNativeWithoutPartitions"); | ||
18 | product.InstallProduct(MSIExec.MSIExecReturnCode.SUCCESS); | ||
19 | |||
20 | product.UninstallProduct(MSIExec.MSIExecReturnCode.SUCCESS); | ||
21 | } | ||
22 | |||
23 | [RuntimeFact] | ||
24 | public void CanInstallUninstallNET3WithoutPartitions() | ||
25 | { | ||
26 | var product = this.CreatePackageInstaller("InstallUninstallNET3WithoutPartitions"); | ||
27 | product.InstallProduct(MSIExec.MSIExecReturnCode.SUCCESS); | ||
28 | |||
29 | product.UninstallProduct(MSIExec.MSIExecReturnCode.SUCCESS); | ||
30 | } | ||
31 | |||
32 | [RuntimeFact] | ||
33 | public void CanInstallUninstallNET4WithoutPartitions() | ||
34 | { | ||
35 | var product = this.CreatePackageInstaller("InstallUninstallNET4WithoutPartitions"); | ||
36 | product.InstallProduct(MSIExec.MSIExecReturnCode.SUCCESS); | ||
37 | |||
38 | product.UninstallProduct(MSIExec.MSIExecReturnCode.SUCCESS); | ||
39 | } | ||
40 | |||
41 | [RuntimeFact(RequireWindowsServer = true)] | ||
42 | public void CanInstallAndUninstallWithPartitions() | ||
43 | { | ||
44 | var product = this.CreatePackageInstaller("InstallUninstallWithPartitions"); | ||
45 | product.InstallProduct(MSIExec.MSIExecReturnCode.SUCCESS); | ||
46 | |||
47 | product.UninstallProduct(MSIExec.MSIExecReturnCode.SUCCESS); | ||
48 | } | ||
49 | } | ||
50 | } | ||