aboutsummaryrefslogtreecommitdiff
path: root/src/ca
diff options
context:
space:
mode:
authorBob Arnson <bob@joyofsetup.com>2020-03-05 19:48:12 -0500
committerBob Arnson <bob@firegiant.com>2020-03-09 12:16:09 -0400
commite9d10933bedb8215ec50ca85db272d6647426b31 (patch)
tree262cbaf190de5d5461941c79923bef8cf4cf7ad1 /src/ca
parent7533ca33de2b8125e9f9ecb3b28a247acca85f83 (diff)
downloadwix-e9d10933bedb8215ec50ca85db272d6647426b31.tar.gz
wix-e9d10933bedb8215ec50ca85db272d6647426b31.tar.bz2
wix-e9d10933bedb8215ec50ca85db272d6647426b31.zip
Version extension ids.
Partial fix for wixtoolset/issues#5933.
Diffstat (limited to 'src/ca')
-rw-r--r--src/ca/CloseApps.cpp28
-rw-r--r--src/ca/FormatFiles.cpp18
-rw-r--r--src/ca/RemoveFoldersEx.cpp14
-rw-r--r--src/ca/RestartManager.cpp8
-rw-r--r--src/ca/TouchFile.cpp16
-rw-r--r--src/ca/XmlConfig.cpp40
-rw-r--r--src/ca/XmlFile.cpp40
-rw-r--r--src/ca/caDecor.h13
-rw-r--r--src/ca/caSuffix.h11
-rw-r--r--src/ca/netshortcuts.cpp16
-rw-r--r--src/ca/precomp.h2
-rw-r--r--src/ca/scamanifest.cpp76
-rw-r--r--src/ca/scaperf.cpp64
-rw-r--r--src/ca/scaperfexec.cpp4
-rw-r--r--src/ca/scasched.cpp16
-rw-r--r--src/ca/scasmb.h2
-rw-r--r--src/ca/scasmbsched.cpp50
-rw-r--r--src/ca/scauser.cpp108
-rw-r--r--src/ca/secureobj.cpp22
-rw-r--r--src/ca/serviceconfig.cpp10
-rw-r--r--src/ca/utilca.vcxproj2
21 files changed, 281 insertions, 279 deletions
diff --git a/src/ca/CloseApps.cpp b/src/ca/CloseApps.cpp
index a3f28ed3..63be353c 100644
--- a/src/ca/CloseApps.cpp
+++ b/src/ca/CloseApps.cpp
@@ -4,10 +4,8 @@
4 4
5#define DEFAULT_PROCESS_EXIT_WAIT_TIME 5000 5#define DEFAULT_PROCESS_EXIT_WAIT_TIME 5000
6 6
7// WixCloseApplication Target Description Condition Attributes Sequence
8
9// structs 7// structs
10LPCWSTR wzQUERY_CLOSEAPPS = L"SELECT `WixCloseApplication`, `Target`, `Description`, `Condition`, `Attributes`, `Property`, `TerminateExitCode`, `Timeout` FROM `WixCloseApplication` ORDER BY `Sequence`"; 8LPCWSTR wzQUERY_CLOSEAPPS = L"SELECT `Wix4CloseApplication`, `Target`, `Description`, `Condition`, `Attributes`, `Property`, `TerminateExitCode`, `Timeout` FROM `Wix4CloseApplication` ORDER BY `Sequence`";
11enum eQUERY_CLOSEAPPS { QCA_ID = 1, QCA_TARGET, QCA_DESCRIPTION, QCA_CONDITION, QCA_ATTRIBUTES, QCA_PROPERTY, QCA_TERMINATEEXITCODE, QCA_TIMEOUT }; 9enum eQUERY_CLOSEAPPS { QCA_ID = 1, QCA_TARGET, QCA_DESCRIPTION, QCA_CONDITION, QCA_ATTRIBUTES, QCA_PROPERTY, QCA_TERMINATEEXITCODE, QCA_TIMEOUT };
12 10
13// CloseApplication.Attributes 11// CloseApplication.Attributes
@@ -294,14 +292,14 @@ extern "C" UINT __stdcall WixCloseApplications(
294 // loop through all the objects to be secured 292 // loop through all the objects to be secured
295 // 293 //
296 hr = WcaOpenExecuteView(wzQUERY_CLOSEAPPS, &hView); 294 hr = WcaOpenExecuteView(wzQUERY_CLOSEAPPS, &hView);
297 ExitOnFailure(hr, "failed to open view on WixCloseApplication table"); 295 ExitOnFailure(hr, "failed to open view on Wix4CloseApplication table");
298 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 296 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
299 { 297 {
300 hr = WcaGetRecordString(hRec, QCA_ID, &pwzId); 298 hr = WcaGetRecordString(hRec, QCA_ID, &pwzId);
301 ExitOnFailure(hr, "failed to get id from WixCloseApplication table"); 299 ExitOnFailure(hr, "failed to get id from Wix4CloseApplication table");
302 300
303 hr = WcaGetRecordString(hRec, QCA_CONDITION, &pwzCondition); 301 hr = WcaGetRecordString(hRec, QCA_CONDITION, &pwzCondition);
304 ExitOnFailure(hr, "failed to get condition from WixCloseApplication table"); 302 ExitOnFailure(hr, "failed to get condition from Wix4CloseApplication table");
305 303
306 if (pwzCondition && *pwzCondition) 304 if (pwzCondition && *pwzCondition)
307 { 305 {
@@ -309,7 +307,7 @@ extern "C" UINT __stdcall WixCloseApplications(
309 if (MSICONDITION_ERROR == condition) 307 if (MSICONDITION_ERROR == condition)
310 { 308 {
311 hr = E_INVALIDARG; 309 hr = E_INVALIDARG;
312 ExitOnFailure(hr, "failed to process condition for WixCloseApplication '%ls'", pwzId); 310 ExitOnFailure(hr, "failed to process condition for Wix4CloseApplication '%ls'", pwzId);
313 } 311 }
314 else if (MSICONDITION_FALSE == condition) 312 else if (MSICONDITION_FALSE == condition)
315 { 313 {
@@ -318,16 +316,16 @@ extern "C" UINT __stdcall WixCloseApplications(
318 } 316 }
319 317
320 hr = WcaGetRecordFormattedString(hRec, QCA_TARGET, &pwzTarget); 318 hr = WcaGetRecordFormattedString(hRec, QCA_TARGET, &pwzTarget);
321 ExitOnFailure(hr, "failed to get target from WixCloseApplication table"); 319 ExitOnFailure(hr, "failed to get target from Wix4CloseApplication table");
322 320
323 hr = WcaGetRecordFormattedString(hRec, QCA_DESCRIPTION, &pwzDescription); 321 hr = WcaGetRecordFormattedString(hRec, QCA_DESCRIPTION, &pwzDescription);
324 ExitOnFailure(hr, "failed to get description from WixCloseApplication table"); 322 ExitOnFailure(hr, "failed to get description from Wix4CloseApplication table");
325 323
326 hr = WcaGetRecordInteger(hRec, QCA_ATTRIBUTES, reinterpret_cast<int*>(&dwAttributes)); 324 hr = WcaGetRecordInteger(hRec, QCA_ATTRIBUTES, reinterpret_cast<int*>(&dwAttributes));
327 ExitOnFailure(hr, "failed to get attributes from WixCloseApplication table"); 325 ExitOnFailure(hr, "failed to get attributes from Wix4CloseApplication table");
328 326
329 hr = WcaGetRecordFormattedString(hRec, QCA_PROPERTY, &pwzProperty); 327 hr = WcaGetRecordFormattedString(hRec, QCA_PROPERTY, &pwzProperty);
330 ExitOnFailure(hr, "failed to get property from WixCloseApplication table"); 328 ExitOnFailure(hr, "failed to get property from Wix4CloseApplication table");
331 329
332 hr = WcaGetRecordInteger(hRec, QCA_TERMINATEEXITCODE, reinterpret_cast<int*>(&dwTerminateExitCode)); 330 hr = WcaGetRecordInteger(hRec, QCA_TERMINATEEXITCODE, reinterpret_cast<int*>(&dwTerminateExitCode));
333 if (S_FALSE == hr) 331 if (S_FALSE == hr)
@@ -335,7 +333,7 @@ extern "C" UINT __stdcall WixCloseApplications(
335 dwTerminateExitCode = 0; 333 dwTerminateExitCode = 0;
336 hr = S_OK; 334 hr = S_OK;
337 } 335 }
338 ExitOnFailure(hr, "failed to get timeout from WixCloseApplication table"); 336 ExitOnFailure(hr, "failed to get timeout from Wix4CloseApplication table");
339 337
340 hr = WcaGetRecordInteger(hRec, QCA_TIMEOUT, reinterpret_cast<int*>(&dwTimeout)); 338 hr = WcaGetRecordInteger(hRec, QCA_TIMEOUT, reinterpret_cast<int*>(&dwTimeout));
341 if (S_FALSE == hr) 339 if (S_FALSE == hr)
@@ -343,7 +341,7 @@ extern "C" UINT __stdcall WixCloseApplications(
343 dwTimeout = DEFAULT_PROCESS_EXIT_WAIT_TIME; 341 dwTimeout = DEFAULT_PROCESS_EXIT_WAIT_TIME;
344 hr = S_OK; 342 hr = S_OK;
345 } 343 }
346 ExitOnFailure(hr, "failed to get timeout from WixCloseApplication table"); 344 ExitOnFailure(hr, "failed to get timeout from Wix4CloseApplication table");
347 345
348 // Before trying any changes to the machine, prompt if requested. 346 // Before trying any changes to the machine, prompt if requested.
349 if (dwAttributes & CLOSEAPP_ATTRIBUTE_PROMPTTOCONTINUE) 347 if (dwAttributes & CLOSEAPP_ATTRIBUTE_PROMPTTOCONTINUE)
@@ -433,8 +431,8 @@ extern "C" UINT __stdcall WixCloseApplications(
433 { 431 {
434 Assert(0 < cCloseApps); 432 Assert(0 < cCloseApps);
435 433
436 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"WixCloseApplicationsDeferred"), pwzCustomActionData, cCloseApps * COST_CLOSEAPP); 434 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"CloseApplicationsDeferred"), pwzCustomActionData, cCloseApps * COST_CLOSEAPP);
437 ExitOnFailure(hr, "failed to schedule WixCloseApplicationsDeferred action"); 435 ExitOnFailure(hr, "failed to schedule CloseApplicationsDeferred action");
438 } 436 }
439 437
440LExit: 438LExit:
diff --git a/src/ca/FormatFiles.cpp b/src/ca/FormatFiles.cpp
index 6a816700..464b92d6 100644
--- a/src/ca/FormatFiles.cpp
+++ b/src/ca/FormatFiles.cpp
@@ -27,9 +27,9 @@ extern "C" UINT __stdcall WixSchedFormatFiles(
27 PSCZ sczRollbackCustomActionData; 27 PSCZ sczRollbackCustomActionData;
28 28
29 LPCWSTR wzQuery = 29 LPCWSTR wzQuery =
30 L"SELECT `WixFormatFiles`.`Binary_`, `WixFormatFiles`.`File_`, `File`.`Component_` " 30 L"SELECT `Wix4FormatFile`.`Binary_`, `Wix4FormatFile`.`File_`, `File`.`Component_` "
31 L"FROM `WixFormatFiles`, `File` " 31 L"FROM `Wix4FormatFile`, `File` "
32 L"WHERE `WixFormatFiles`.`File_` = `File`.`File`"; 32 L"WHERE `Wix4FormatFile`.`File_` = `File`.`File`";
33 enum eQuery { eqBinaryKey = 1, eqFileKey, eqComponentKey }; 33 enum eQuery { eqBinaryKey = 1, eqFileKey, eqComponentKey };
34 34
35 // initialize 35 // initialize
@@ -38,7 +38,7 @@ extern "C" UINT __stdcall WixSchedFormatFiles(
38 38
39 // query and loop through all the files 39 // query and loop through all the files
40 hr = WcaOpenExecuteView(wzQuery, &hView); 40 hr = WcaOpenExecuteView(wzQuery, &hView);
41 ExitOnFailure(hr, "Failed to open view on WixFormatFiles table"); 41 ExitOnFailure(hr, "Failed to open view on Wix4FormatFile table");
42 42
43 DWORD cFiles = 0; 43 DWORD cFiles = 0;
44 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 44 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
@@ -100,19 +100,19 @@ extern "C" UINT __stdcall WixSchedFormatFiles(
100 { 100 {
101 hr = S_OK; 101 hr = S_OK;
102 } 102 }
103 ExitOnFailure(hr, "Failure occurred while processing WixFormatFiles table"); 103 ExitOnFailure(hr, "Failure occurred while processing Wix4FormatFile table");
104 104
105 // schedule deferred CAs if there's anything to do 105 // schedule deferred CAs if there's anything to do
106 if (sczRollbackCustomActionData && *sczRollbackCustomActionData) 106 if (sczRollbackCustomActionData && *sczRollbackCustomActionData)
107 { 107 {
108 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"WixRollbackFormatFiles"), sczRollbackCustomActionData, cFiles * COST_FILEFORMATTING); 108 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackFormatFiles"), sczRollbackCustomActionData, cFiles * COST_FILEFORMATTING);
109 ExitOnFailure(hr, "Failed to schedule WixRollbackFormatFiles"); 109 ExitOnFailure(hr, "Failed to schedule RollbackFormatFiles");
110 } 110 }
111 111
112 if (sczExecCustomActionData && *sczExecCustomActionData) 112 if (sczExecCustomActionData && *sczExecCustomActionData)
113 { 113 {
114 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"WixExecFormatFiles"), sczExecCustomActionData, cFiles * COST_FILEFORMATTING); 114 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecFormatFiles"), sczExecCustomActionData, cFiles * COST_FILEFORMATTING);
115 ExitOnFailure(hr, "Failed to schedule WixExecFormatFiles"); 115 ExitOnFailure(hr, "Failed to schedule ExecFormatFiles");
116 } 116 }
117 117
118LExit: 118LExit:
diff --git a/src/ca/RemoveFoldersEx.cpp b/src/ca/RemoveFoldersEx.cpp
index 194c6662..ce64c2c2 100644
--- a/src/ca/RemoveFoldersEx.cpp
+++ b/src/ca/RemoveFoldersEx.cpp
@@ -2,7 +2,7 @@
2 2
3#include "precomp.h" 3#include "precomp.h"
4 4
5LPCWSTR vcsRemoveFolderExQuery = L"SELECT `WixRemoveFolderEx`, `Component_`, `Property`, `InstallMode` FROM `WixRemoveFolderEx`"; 5LPCWSTR vcsRemoveFolderExQuery = L"SELECT `Wix4RemoveFolderEx`, `Component_`, `Property`, `InstallMode` FROM `Wix4RemoveFolderEx`";
6enum eRemoveFolderExQuery { rfqId = 1, rfqComponent, rfqProperty, feqMode }; 6enum eRemoveFolderExQuery { rfqId = 1, rfqComponent, rfqProperty, feqMode };
7 7
8static HRESULT RecursePath( 8static HRESULT RecursePath(
@@ -81,10 +81,10 @@ static HRESULT RecursePath(
81 81
82 // Add the row to remove any files and another row to remove the folder. 82 // Add the row to remove any files and another row to remove the folder.
83 hr = WcaAddTempRecord(phTable, phColumns, L"RemoveFile", NULL, 1, 5, L"RfxFiles", wzComponent, L"*.*", sczProperty, iMode); 83 hr = WcaAddTempRecord(phTable, phColumns, L"RemoveFile", NULL, 1, 5, L"RfxFiles", wzComponent, L"*.*", sczProperty, iMode);
84 ExitOnFailure(hr, "Failed to add row to remove all files for WixRemoveFolderEx row: %S under path:", wzId, wzPath); 84 ExitOnFailure(hr, "Failed to add row to remove all files for Wix4RemoveFolderEx row: %S under path:", wzId, wzPath);
85 85
86 hr = WcaAddTempRecord(phTable, phColumns, L"RemoveFile", NULL, 1, 5, L"RfxFolder", wzComponent, NULL, sczProperty, iMode); 86 hr = WcaAddTempRecord(phTable, phColumns, L"RemoveFile", NULL, 1, 5, L"RfxFolder", wzComponent, NULL, sczProperty, iMode);
87 ExitOnFailure(hr, "Failed to add row to remove folder for WixRemoveFolderEx row: %S under path: %S", wzId, wzPath); 87 ExitOnFailure(hr, "Failed to add row to remove folder for Wix4RemoveFolderEx row: %S under path: %S", wzId, wzPath);
88 88
89LExit: 89LExit:
90 if (INVALID_HANDLE_VALUE != hFind) 90 if (INVALID_HANDLE_VALUE != hFind)
@@ -122,15 +122,15 @@ extern "C" UINT WINAPI WixRemoveFoldersEx(
122 ExitOnFailure(hr, "Failed to initialize WixRemoveFoldersEx."); 122 ExitOnFailure(hr, "Failed to initialize WixRemoveFoldersEx.");
123 123
124 // anything to do? 124 // anything to do?
125 if (S_OK != WcaTableExists(L"WixRemoveFolderEx")) 125 if (S_OK != WcaTableExists(L"Wix4RemoveFolderEx"))
126 { 126 {
127 WcaLog(LOGMSG_STANDARD, "WixRemoveFolderEx table doesn't exist, so there are no folders to remove."); 127 WcaLog(LOGMSG_STANDARD, "Wix4RemoveFolderEx table doesn't exist, so there are no folders to remove.");
128 ExitFunction(); 128 ExitFunction();
129 } 129 }
130 130
131 // query and loop through all the remove folders exceptions 131 // query and loop through all the remove folders exceptions
132 hr = WcaOpenExecuteView(vcsRemoveFolderExQuery, &hView); 132 hr = WcaOpenExecuteView(vcsRemoveFolderExQuery, &hView);
133 ExitOnFailure(hr, "Failed to open view on WixRemoveFolderEx table"); 133 ExitOnFailure(hr, "Failed to open view on Wix4RemoveFolderEx table");
134 134
135 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 135 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
136 { 136 {
@@ -173,7 +173,7 @@ extern "C" UINT WINAPI WixRemoveFoldersEx(
173 { 173 {
174 hr = S_OK; 174 hr = S_OK;
175 } 175 }
176 ExitOnFailure(hr, "Failure occured while processing WixRemoveFolderEx table"); 176 ExitOnFailure(hr, "Failure occured while processing Wix4RemoveFolderEx table");
177 177
178LExit: 178LExit:
179 if (hColumns) 179 if (hColumns)
diff --git a/src/ca/RestartManager.cpp b/src/ca/RestartManager.cpp
index 3cfc07ee..c31819c1 100644
--- a/src/ca/RestartManager.cpp
+++ b/src/ca/RestartManager.cpp
@@ -18,8 +18,8 @@ enum eRmuResourceType
18}; 18};
19 19
20LPCWSTR vcsRestartResourceQuery = 20LPCWSTR vcsRestartResourceQuery =
21 L"SELECT `WixRestartResource`.`WixRestartResource`, `WixRestartResource`.`Component_`, `WixRestartResource`.`Resource`, `WixRestartResource`.`Attributes` " 21 L"SELECT `Wix4RestartResource`.`Wix4RestartResource`, `Wix4RestartResource`.`Component_`, `Wix4RestartResource`.`Resource`, `Wix4RestartResource`.`Attributes` "
22 L"FROM `WixRestartResource`"; 22 L"FROM `Wix4RestartResource`";
23enum eRestartResourceQuery { rrqRestartResource = 1, rrqComponent, rrqResource, rrqAttributes }; 23enum eRestartResourceQuery { rrqRestartResource = 1, rrqComponent, rrqResource, rrqAttributes };
24 24
25/******************************************************************** 25/********************************************************************
@@ -58,9 +58,9 @@ extern "C" UINT __stdcall WixRegisterRestartResources(
58 ExitOnFailure(hr, "Failed to initialize."); 58 ExitOnFailure(hr, "Failed to initialize.");
59 59
60 // Skip if the table doesn't exist. 60 // Skip if the table doesn't exist.
61 if (S_OK != WcaTableExists(L"WixRestartResource")) 61 if (S_OK != WcaTableExists(L"Wix4RestartResource"))
62 { 62 {
63 WcaLog(LOGMSG_STANDARD, "The RestartResource table does not exist; there are no resources to register with Restart Manager."); 63 WcaLog(LOGMSG_STANDARD, "The Wix4RestartResource table does not exist; there are no resources to register with Restart Manager.");
64 ExitFunction(); 64 ExitFunction();
65 } 65 }
66 66
diff --git a/src/ca/TouchFile.cpp b/src/ca/TouchFile.cpp
index 1c40a3eb..e704f922 100644
--- a/src/ca/TouchFile.cpp
+++ b/src/ca/TouchFile.cpp
@@ -2,7 +2,7 @@
2 2
3#include "precomp.h" 3#include "precomp.h"
4 4
5LPCWSTR vcsTouchFileQuery = L"SELECT `WixTouchFile`, `Component_`, `Path`, `Attributes` FROM `WixTouchFile`"; 5LPCWSTR vcsTouchFileQuery = L"SELECT `Wix4TouchFile`, `Component_`, `Path`, `Attributes` FROM `Wix4TouchFile`";
6enum TOUCH_FILE_QUERY { tfqId = 1, tfqComponent, tfqPath, tfqTouchFileAttributes }; 6enum TOUCH_FILE_QUERY { tfqId = 1, tfqComponent, tfqPath, tfqTouchFileAttributes };
7 7
8enum TOUCH_FILE_ATTRIBUTE 8enum TOUCH_FILE_ATTRIBUTE
@@ -134,7 +134,7 @@ static HRESULT ProcessTouchFileTable(
134 LPWSTR sczRollbackData = NULL; 134 LPWSTR sczRollbackData = NULL;
135 LPWSTR sczExecuteData = NULL; 135 LPWSTR sczExecuteData = NULL;
136 136
137 if (S_OK != WcaTableExists(L"WixTouchFile")) 137 if (S_OK != WcaTableExists(L"Wix4TouchFile"))
138 { 138 {
139 ExitFunction(); 139 ExitFunction();
140 } 140 }
@@ -142,7 +142,7 @@ static HRESULT ProcessTouchFileTable(
142 ::GetSystemTimeAsFileTime(&ftModified); 142 ::GetSystemTimeAsFileTime(&ftModified);
143 143
144 hr = WcaOpenExecuteView(vcsTouchFileQuery, &hView); 144 hr = WcaOpenExecuteView(vcsTouchFileQuery, &hView);
145 ExitOnFailure(hr, "Failed to open view on WixTouchFile table"); 145 ExitOnFailure(hr, "Failed to open view on Wix4TouchFile table");
146 146
147 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 147 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
148 { 148 {
@@ -181,18 +181,18 @@ static HRESULT ProcessTouchFileTable(
181 { 181 {
182 hr = S_OK; 182 hr = S_OK;
183 } 183 }
184 ExitOnFailure(hr, "Failure occured while processing WixTouchFile table"); 184 ExitOnFailure(hr, "Failure occured while processing Wix4TouchFile table");
185 185
186 if (sczRollbackData) 186 if (sczRollbackData)
187 { 187 {
188 hr = WcaDoDeferredAction(L"WixRollbackTouchFile", sczRollbackData, 0); 188 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackTouchFile"), sczRollbackData, 0);
189 ExitOnFailure(hr, "Failed to schedule WixRollbackTouchFile"); 189 ExitOnFailure(hr, "Failed to schedule RollbackTouchFile");
190 } 190 }
191 191
192 if (sczExecuteData) 192 if (sczExecuteData)
193 { 193 {
194 hr = WcaDoDeferredAction(L"WixExecuteTouchFile", sczExecuteData, 0); 194 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecuteTouchFile"), sczExecuteData, 0);
195 ExitOnFailure(hr, "Failed to schedule WixExecuteTouchFile"); 195 ExitOnFailure(hr, "Failed to schedule ExecuteTouchFile");
196 } 196 }
197 197
198LExit: 198LExit:
diff --git a/src/ca/XmlConfig.cpp b/src/ca/XmlConfig.cpp
index c12b2bc2..8c60979d 100644
--- a/src/ca/XmlConfig.cpp
+++ b/src/ca/XmlConfig.cpp
@@ -30,9 +30,9 @@ enum eXmlPreserveDate
30}; 30};
31 31
32LPCWSTR vcsXmlConfigQuery = 32LPCWSTR vcsXmlConfigQuery =
33 L"SELECT `XmlConfig`.`XmlConfig`, `XmlConfig`.`File`, `XmlConfig`.`ElementPath`, `XmlConfig`.`VerifyPath`, `XmlConfig`.`Name`, " 33 L"SELECT `Wix4XmlConfig`.`Wix4XmlConfig`, `Wix4XmlConfig`.`File`, `Wix4XmlConfig`.`ElementPath`, `Wix4XmlConfig`.`VerifyPath`, `Wix4XmlConfig`.`Name`, "
34 L"`XmlConfig`.`Value`, `XmlConfig`.`Flags`, `XmlConfig`.`Component_`, `Component`.`Attributes` " 34 L"`Wix4XmlConfig`.`Value`, `Wix4XmlConfig`.`Flags`, `Wix4XmlConfig`.`Component_`, `Component`.`Attributes` "
35 L"FROM `XmlConfig`,`Component` WHERE `XmlConfig`.`Component_`=`Component`.`Component` ORDER BY `File`, `Sequence`"; 35 L"FROM `Wix4XmlConfig`,`Component` WHERE `Wix4XmlConfig`.`Component_`=`Component`.`Component` ORDER BY `File`, `Sequence`";
36enum eXmlConfigQuery { xfqXmlConfig = 1, xfqFile, xfqElementPath, xfqVerifyPath, xfqName, xfqValue, xfqXmlFlags, xfqComponent, xfqCompAttributes }; 36enum eXmlConfigQuery { xfqXmlConfig = 1, xfqFile, xfqElementPath, xfqVerifyPath, xfqName, xfqValue, xfqXmlFlags, xfqComponent, xfqCompAttributes };
37 37
38struct XML_CONFIG_CHANGE 38struct XML_CONFIG_CHANGE
@@ -146,7 +146,7 @@ static HRESULT ReadXmlConfigTable(
146 146
147 // loop through all the xml configurations 147 // loop through all the xml configurations
148 hr = WcaOpenExecuteView(vcsXmlConfigQuery, &hView); 148 hr = WcaOpenExecuteView(vcsXmlConfigQuery, &hView);
149 ExitOnFailure(hr, "failed to open view on XmlConfig table"); 149 ExitOnFailure(hr, "failed to open view on Wix4XmlConfig table");
150 150
151 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 151 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
152 { 152 {
@@ -155,13 +155,13 @@ static HRESULT ReadXmlConfigTable(
155 155
156 // Get record Id 156 // Get record Id
157 hr = WcaGetRecordString(hRec, xfqXmlConfig, &pwzData); 157 hr = WcaGetRecordString(hRec, xfqXmlConfig, &pwzData);
158 ExitOnFailure(hr, "failed to get XmlConfig record Id"); 158 ExitOnFailure(hr, "failed to get Wix4XmlConfig record Id");
159 hr = StringCchCopyW((*ppxfcTail)->wzId, countof((*ppxfcTail)->wzId), pwzData); 159 hr = StringCchCopyW((*ppxfcTail)->wzId, countof((*ppxfcTail)->wzId), pwzData);
160 ExitOnFailure(hr, "failed to copy XmlConfig record Id"); 160 ExitOnFailure(hr, "failed to copy Wix4XmlConfig record Id");
161 161
162 // Get component name 162 // Get component name
163 hr = WcaGetRecordString(hRec, xfqComponent, &pwzData); 163 hr = WcaGetRecordString(hRec, xfqComponent, &pwzData);
164 ExitOnFailure(hr, "failed to get component name for XmlConfig: %ls", (*ppxfcTail)->wzId); 164 ExitOnFailure(hr, "failed to get component name for Wix4XmlConfig: %ls", (*ppxfcTail)->wzId);
165 165
166 // Get the component's state 166 // Get the component's state
167 if (0 < lstrlenW(pwzData)) 167 if (0 < lstrlenW(pwzData))
@@ -175,45 +175,45 @@ static HRESULT ReadXmlConfigTable(
175 175
176 // Get the xml file 176 // Get the xml file
177 hr = WcaGetRecordFormattedString(hRec, xfqFile, &pwzData); 177 hr = WcaGetRecordFormattedString(hRec, xfqFile, &pwzData);
178 ExitOnFailure(hr, "failed to get xml file for XmlConfig: %ls", (*ppxfcTail)->wzId); 178 ExitOnFailure(hr, "failed to get xml file for Wix4XmlConfig: %ls", (*ppxfcTail)->wzId);
179 hr = StringCchCopyW((*ppxfcTail)->wzFile, countof((*ppxfcTail)->wzFile), pwzData); 179 hr = StringCchCopyW((*ppxfcTail)->wzFile, countof((*ppxfcTail)->wzFile), pwzData);
180 ExitOnFailure(hr, "failed to copy xml file path"); 180 ExitOnFailure(hr, "failed to copy xml file path");
181 181
182 // Figure out if the file is already on the machine or if it's being installed 182 // Figure out if the file is already on the machine or if it's being installed
183 hr = WcaGetRecordString(hRec, xfqFile, &pwzData); 183 hr = WcaGetRecordString(hRec, xfqFile, &pwzData);
184 ExitOnFailure(hr, "failed to get xml file for XmlConfig: %ls", (*ppxfcTail)->wzId); 184 ExitOnFailure(hr, "failed to get xml file for Wix4XmlConfig: %ls", (*ppxfcTail)->wzId);
185 if (NULL != wcsstr(pwzData, L"[!") || NULL != wcsstr(pwzData, L"[#")) 185 if (NULL != wcsstr(pwzData, L"[!") || NULL != wcsstr(pwzData, L"[#"))
186 { 186 {
187 (*ppxfcTail)->fInstalledFile = TRUE; 187 (*ppxfcTail)->fInstalledFile = TRUE;
188 } 188 }
189 189
190 // Get the XmlConfig table flags 190 // Get the Wix4XmlConfig table flags
191 hr = WcaGetRecordInteger(hRec, xfqXmlFlags, &(*ppxfcTail)->iXmlFlags); 191 hr = WcaGetRecordInteger(hRec, xfqXmlFlags, &(*ppxfcTail)->iXmlFlags);
192 ExitOnFailure(hr, "failed to get XmlConfig flags for XmlConfig: %ls", (*ppxfcTail)->wzId); 192 ExitOnFailure(hr, "failed to get Wix4XmlConfig flags for Wix4XmlConfig: %ls", (*ppxfcTail)->wzId);
193 193
194 // Get the Element Path 194 // Get the Element Path
195 hr = WcaGetRecordFormattedString(hRec, xfqElementPath, &(*ppxfcTail)->pwzElementPath); 195 hr = WcaGetRecordFormattedString(hRec, xfqElementPath, &(*ppxfcTail)->pwzElementPath);
196 ExitOnFailure(hr, "failed to get Element Path for XmlConfig: %ls", (*ppxfcTail)->wzId); 196 ExitOnFailure(hr, "failed to get Element Path for Wix4XmlConfig: %ls", (*ppxfcTail)->wzId);
197 197
198 // Get the Verify Path 198 // Get the Verify Path
199 hr = WcaGetRecordFormattedString(hRec, xfqVerifyPath, &(*ppxfcTail)->pwzVerifyPath); 199 hr = WcaGetRecordFormattedString(hRec, xfqVerifyPath, &(*ppxfcTail)->pwzVerifyPath);
200 ExitOnFailure(hr, "failed to get Verify Path for XmlConfig: %ls", (*ppxfcTail)->wzId); 200 ExitOnFailure(hr, "failed to get Verify Path for Wix4XmlConfig: %ls", (*ppxfcTail)->wzId);
201 201
202 // Get the name 202 // Get the name
203 hr = WcaGetRecordFormattedString(hRec, xfqName, &pwzData); 203 hr = WcaGetRecordFormattedString(hRec, xfqName, &pwzData);
204 ExitOnFailure(hr, "failed to get Name for XmlConfig: %ls", (*ppxfcTail)->wzId); 204 ExitOnFailure(hr, "failed to get Name for Wix4XmlConfig: %ls", (*ppxfcTail)->wzId);
205 hr = StringCchCopyW((*ppxfcTail)->wzName, countof((*ppxfcTail)->wzName), pwzData); 205 hr = StringCchCopyW((*ppxfcTail)->wzName, countof((*ppxfcTail)->wzName), pwzData);
206 ExitOnFailure(hr, "failed to copy name of element"); 206 ExitOnFailure(hr, "failed to copy name of element");
207 207
208 // Get the value 208 // Get the value
209 hr = WcaGetRecordFormattedString(hRec, xfqValue, &pwzData); 209 hr = WcaGetRecordFormattedString(hRec, xfqValue, &pwzData);
210 ExitOnFailure(hr, "failed to get Value for XmlConfig: %ls", (*ppxfcTail)->wzId); 210 ExitOnFailure(hr, "failed to get Value for Wix4XmlConfig: %ls", (*ppxfcTail)->wzId);
211 hr = StrAllocString(&(*ppxfcTail)->pwzValue, pwzData, 0); 211 hr = StrAllocString(&(*ppxfcTail)->pwzValue, pwzData, 0);
212 ExitOnFailure(hr, "failed to allocate buffer for value"); 212 ExitOnFailure(hr, "failed to allocate buffer for value");
213 213
214 // Get the component attributes 214 // Get the component attributes
215 hr = WcaGetRecordInteger(hRec, xfqCompAttributes, &(*ppxfcTail)->iCompAttributes); 215 hr = WcaGetRecordInteger(hRec, xfqCompAttributes, &(*ppxfcTail)->iCompAttributes);
216 ExitOnFailure(hr, "failed to get component attributes for XmlConfig: %ls", (*ppxfcTail)->wzId); 216 ExitOnFailure(hr, "failed to get component attributes for Wix4XmlConfig: %ls", (*ppxfcTail)->wzId);
217 } 217 }
218 218
219 // if we looped through all records all is well 219 // if we looped through all records all is well
@@ -359,7 +359,7 @@ static HRESULT BeginChangeFile(
359 hr = WcaWriteStreamToCaData(pbData, cbData, &pwzRollbackCustomActionData); 359 hr = WcaWriteStreamToCaData(pbData, cbData, &pwzRollbackCustomActionData);
360 ExitOnFailure(hr, "failed to write file contents to rollback custom action data."); 360 ExitOnFailure(hr, "failed to write file contents to rollback custom action data.");
361 361
362 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"ExecXmlConfigRollback"), pwzRollbackCustomActionData, COST_XMLFILE); 362 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecXmlConfigRollback"), pwzRollbackCustomActionData, COST_XMLFILE);
363 ExitOnFailure(hr, "failed to schedule ExecXmlConfigRollback for file: %ls", pwzFile); 363 ExitOnFailure(hr, "failed to schedule ExecXmlConfigRollback for file: %ls", pwzFile);
364 364
365 ReleaseStr(pwzRollbackCustomActionData); 365 ReleaseStr(pwzRollbackCustomActionData);
@@ -459,10 +459,10 @@ extern "C" UINT __stdcall SchedXmlConfig(
459 ExitOnFailure(hr, "failed to initialize"); 459 ExitOnFailure(hr, "failed to initialize");
460 460
461 hr = ReadXmlConfigTable(&pxfcHead, &pxfcTail); 461 hr = ReadXmlConfigTable(&pxfcHead, &pxfcTail);
462 MessageExitOnFailure(hr, msierrXmlConfigFailedRead, "failed to read XmlConfig table"); 462 MessageExitOnFailure(hr, msierrXmlConfigFailedRead, "failed to read Wix4XmlConfig table");
463 463
464 hr = ProcessChanges(&pxfcHead); 464 hr = ProcessChanges(&pxfcHead);
465 ExitOnFailure(hr, "failed to process XmlConfig changes"); 465 ExitOnFailure(hr, "failed to process Wix4XmlConfig changes");
466 466
467 // loop through all the xml configurations 467 // loop through all the xml configurations
468 for (pxfc = pxfcHead; pxfc; pxfc = pxfc->pxfcNext) 468 for (pxfc = pxfcHead; pxfc; pxfc = pxfc->pxfcNext)
@@ -557,7 +557,7 @@ extern "C" UINT __stdcall SchedXmlConfig(
557 { 557 {
558 Assert(0 < cFiles); 558 Assert(0 < cFiles);
559 559
560 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"ExecXmlConfig"), pwzCustomActionData, cFiles * COST_XMLFILE); 560 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecXmlConfig"), pwzCustomActionData, cFiles * COST_XMLFILE);
561 ExitOnFailure(hr, "failed to schedule ExecXmlConfig action"); 561 ExitOnFailure(hr, "failed to schedule ExecXmlConfig action");
562 } 562 }
563 563
diff --git a/src/ca/XmlFile.cpp b/src/ca/XmlFile.cpp
index fc6f519b..95449126 100644
--- a/src/ca/XmlFile.cpp
+++ b/src/ca/XmlFile.cpp
@@ -36,9 +36,9 @@ enum eXmlSelectionLanguage
36}; 36};
37 37
38LPCWSTR vcsXmlFileQuery = 38LPCWSTR vcsXmlFileQuery =
39 L"SELECT `XmlFile`.`XmlFile`, `XmlFile`.`File`, `XmlFile`.`ElementPath`, `XmlFile`.`Name`, `XmlFile`.`Value`, " 39 L"SELECT `Wix4XmlFile`.`Wix4XmlFile`, `Wix4XmlFile`.`File`, `Wix4XmlFile`.`ElementPath`, `Wix4XmlFile`.`Name`, `Wix4XmlFile`.`Value`, "
40 L"`XmlFile`.`Flags`, `XmlFile`.`Component_`, `Component`.`Attributes` " 40 L"`Wix4XmlFile`.`Flags`, `Wix4XmlFile`.`Component_`, `Component`.`Attributes` "
41 L"FROM `XmlFile`,`Component` WHERE `XmlFile`.`Component_`=`Component`.`Component` ORDER BY `File`, `Sequence`"; 41 L"FROM `Wix4XmlFile`,`Component` WHERE `Wix4XmlFile`.`Component_`=`Component`.`Component` ORDER BY `File`, `Sequence`";
42enum eXmlFileQuery { xfqXmlFile = 1, xfqFile, xfqXPath, xfqName, xfqValue, xfqXmlFlags, xfqComponent, xfqCompAttributes }; 42enum eXmlFileQuery { xfqXmlFile = 1, xfqFile, xfqXPath, xfqName, xfqValue, xfqXmlFlags, xfqComponent, xfqCompAttributes };
43 43
44struct XML_FILE_CHANGE 44struct XML_FILE_CHANGE
@@ -130,12 +130,14 @@ static HRESULT ReadXmlFileTable(
130 LPWSTR pwzData = NULL; 130 LPWSTR pwzData = NULL;
131 131
132 // check to see if necessary tables are specified 132 // check to see if necessary tables are specified
133 if (S_FALSE == WcaTableExists(L"XmlFile")) 133 if (S_FALSE == WcaTableExists(L"Wix4XmlFile"))
134 {
134 ExitFunction1(hr = S_FALSE); 135 ExitFunction1(hr = S_FALSE);
136 }
135 137
136 // loop through all the xml configurations 138 // loop through all the xml configurations
137 hr = WcaOpenExecuteView(vcsXmlFileQuery, &hView); 139 hr = WcaOpenExecuteView(vcsXmlFileQuery, &hView);
138 ExitOnFailure(hr, "failed to open view on XmlFile table"); 140 ExitOnFailure(hr, "failed to open view on Wix4XmlFile table");
139 141
140 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 142 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
141 { 143 {
@@ -144,13 +146,13 @@ static HRESULT ReadXmlFileTable(
144 146
145 // Get record Id 147 // Get record Id
146 hr = WcaGetRecordString(hRec, xfqXmlFile, &pwzData); 148 hr = WcaGetRecordString(hRec, xfqXmlFile, &pwzData);
147 ExitOnFailure(hr, "failed to get XmlFile record Id"); 149 ExitOnFailure(hr, "failed to get Wix4XmlFile record Id");
148 hr = StringCchCopyW((*ppxfcTail)->wzId, countof((*ppxfcTail)->wzId), pwzData); 150 hr = StringCchCopyW((*ppxfcTail)->wzId, countof((*ppxfcTail)->wzId), pwzData);
149 ExitOnFailure(hr, "failed to copy XmlFile record Id"); 151 ExitOnFailure(hr, "failed to copy Wix4XmlFile record Id");
150 152
151 // Get component name 153 // Get component name
152 hr = WcaGetRecordString(hRec, xfqComponent, &pwzData); 154 hr = WcaGetRecordString(hRec, xfqComponent, &pwzData);
153 ExitOnFailure(hr, "failed to get component name for XmlFile: %ls", (*ppxfcTail)->wzId); 155 ExitOnFailure(hr, "failed to get component name for Wix4XmlFile: %ls", (*ppxfcTail)->wzId);
154 156
155 // Get the component's state 157 // Get the component's state
156 er = ::MsiGetComponentStateW(WcaGetInstallHandle(), pwzData, &(*ppxfcTail)->isInstalled, &(*ppxfcTail)->isAction); 158 er = ::MsiGetComponentStateW(WcaGetInstallHandle(), pwzData, &(*ppxfcTail)->isInstalled, &(*ppxfcTail)->isAction);
@@ -158,33 +160,33 @@ static HRESULT ReadXmlFileTable(
158 160
159 // Get the xml file 161 // Get the xml file
160 hr = WcaGetRecordFormattedString(hRec, xfqFile, &pwzData); 162 hr = WcaGetRecordFormattedString(hRec, xfqFile, &pwzData);
161 ExitOnFailure(hr, "failed to get xml file for XmlFile: %ls", (*ppxfcTail)->wzId); 163 ExitOnFailure(hr, "failed to get xml file for Wix4XmlFile: %ls", (*ppxfcTail)->wzId);
162 hr = StringCchCopyW((*ppxfcTail)->wzFile, countof((*ppxfcTail)->wzFile), pwzData); 164 hr = StringCchCopyW((*ppxfcTail)->wzFile, countof((*ppxfcTail)->wzFile), pwzData);
163 ExitOnFailure(hr, "failed to copy xml file path"); 165 ExitOnFailure(hr, "failed to copy xml file path");
164 166
165 // Get the XmlFile table flags 167 // Get the Wix4XmlFile table flags
166 hr = WcaGetRecordInteger(hRec, xfqXmlFlags, &(*ppxfcTail)->iXmlFlags); 168 hr = WcaGetRecordInteger(hRec, xfqXmlFlags, &(*ppxfcTail)->iXmlFlags);
167 ExitOnFailure(hr, "failed to get XmlFile flags for XmlFile: %ls", (*ppxfcTail)->wzId); 169 ExitOnFailure(hr, "failed to get Wix4XmlFile flags for Wix4XmlFile: %ls", (*ppxfcTail)->wzId);
168 170
169 // Get the XPath 171 // Get the XPath
170 hr = WcaGetRecordFormattedString(hRec, xfqXPath, &(*ppxfcTail)->pwzElementPath); 172 hr = WcaGetRecordFormattedString(hRec, xfqXPath, &(*ppxfcTail)->pwzElementPath);
171 ExitOnFailure(hr, "failed to get XPath for XmlFile: %ls", (*ppxfcTail)->wzId); 173 ExitOnFailure(hr, "failed to get XPath for Wix4XmlFile: %ls", (*ppxfcTail)->wzId);
172 174
173 // Get the name 175 // Get the name
174 hr = WcaGetRecordFormattedString(hRec, xfqName, &pwzData); 176 hr = WcaGetRecordFormattedString(hRec, xfqName, &pwzData);
175 ExitOnFailure(hr, "failed to get Name for XmlFile: %ls", (*ppxfcTail)->wzId); 177 ExitOnFailure(hr, "failed to get Name for Wix4XmlFile: %ls", (*ppxfcTail)->wzId);
176 hr = StringCchCopyW((*ppxfcTail)->wzName, countof((*ppxfcTail)->wzName), pwzData); 178 hr = StringCchCopyW((*ppxfcTail)->wzName, countof((*ppxfcTail)->wzName), pwzData);
177 ExitOnFailure(hr, "failed to copy name of element"); 179 ExitOnFailure(hr, "failed to copy name of element");
178 180
179 // Get the value 181 // Get the value
180 hr = WcaGetRecordFormattedString(hRec, xfqValue, &pwzData); 182 hr = WcaGetRecordFormattedString(hRec, xfqValue, &pwzData);
181 ExitOnFailure(hr, "failed to get Value for XmlFile: %ls", (*ppxfcTail)->wzId); 183 ExitOnFailure(hr, "failed to get Value for Wix4XmlFile: %ls", (*ppxfcTail)->wzId);
182 hr = StrAllocString(&(*ppxfcTail)->pwzValue, pwzData, 0); 184 hr = StrAllocString(&(*ppxfcTail)->pwzValue, pwzData, 0);
183 ExitOnFailure(hr, "failed to allocate buffer for value"); 185 ExitOnFailure(hr, "failed to allocate buffer for value");
184 186
185 // Get the component attributes 187 // Get the component attributes
186 hr = WcaGetRecordInteger(hRec, xfqCompAttributes, &(*ppxfcTail)->iCompAttributes); 188 hr = WcaGetRecordInteger(hRec, xfqCompAttributes, &(*ppxfcTail)->iCompAttributes);
187 ExitOnFailure(hr, "failed to get component attributes for XmlFile: %ls", (*ppxfcTail)->wzId); 189 ExitOnFailure(hr, "failed to get component attributes for Wix4XmlFile: %ls", (*ppxfcTail)->wzId);
188 } 190 }
189 191
190 // if we looped through all records all is well 192 // if we looped through all records all is well
@@ -254,7 +256,7 @@ static HRESULT BeginChangeFile(
254 hr = WcaWriteStreamToCaData(pbData, cbData, &pwzRollbackCustomActionData); 256 hr = WcaWriteStreamToCaData(pbData, cbData, &pwzRollbackCustomActionData);
255 ExitOnFailure(hr, "failed to write file contents to rollback custom action data."); 257 ExitOnFailure(hr, "failed to write file contents to rollback custom action data.");
256 258
257 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"ExecXmlFileRollback"), pwzRollbackCustomActionData, COST_XMLFILE); 259 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecXmlFileRollback"), pwzRollbackCustomActionData, COST_XMLFILE);
258 ExitOnFailure(hr, "failed to schedule ExecXmlFileRollback for file: %ls", pwzFile); 260 ExitOnFailure(hr, "failed to schedule ExecXmlFileRollback for file: %ls", pwzFile);
259 261
260 ReleaseStr(pwzRollbackCustomActionData); 262 ReleaseStr(pwzRollbackCustomActionData);
@@ -325,11 +327,11 @@ extern "C" UINT __stdcall SchedXmlFile(
325 hr = ReadXmlFileTable(&pxfcHead, &pxfcTail); 327 hr = ReadXmlFileTable(&pxfcHead, &pxfcTail);
326 if (S_FALSE == hr) 328 if (S_FALSE == hr)
327 { 329 {
328 WcaLog(LOGMSG_VERBOSE, "Skipping SchedXmlFile because XmlFile table not present"); 330 WcaLog(LOGMSG_VERBOSE, "Skipping SchedXmlFile because Wix4XmlFile table not present");
329 ExitFunction1(hr = S_OK); 331 ExitFunction1(hr = S_OK);
330 } 332 }
331 333
332 MessageExitOnFailure(hr, msierrXmlFileFailedRead, "failed to read XmlFile table"); 334 MessageExitOnFailure(hr, msierrXmlFileFailedRead, "failed to read Wix4XmlFile table");
333 335
334 // loop through all the xml configurations 336 // loop through all the xml configurations
335 for (pxfc = pxfcHead; pxfc; pxfc = pxfc->pxfcNext) 337 for (pxfc = pxfcHead; pxfc; pxfc = pxfc->pxfcNext)
@@ -454,7 +456,7 @@ extern "C" UINT __stdcall SchedXmlFile(
454 { 456 {
455 Assert(0 < cFiles); 457 Assert(0 < cFiles);
456 458
457 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"ExecXmlFile"), pwzCustomActionData, cFiles * COST_XMLFILE); 459 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecXmlFile"), pwzCustomActionData, cFiles * COST_XMLFILE);
458 ExitOnFailure(hr, "failed to schedule ExecXmlFile action"); 460 ExitOnFailure(hr, "failed to schedule ExecXmlFile action");
459 } 461 }
460 462
diff --git a/src/ca/caDecor.h b/src/ca/caDecor.h
new file mode 100644
index 00000000..56cfb201
--- /dev/null
+++ b/src/ca/caDecor.h
@@ -0,0 +1,13 @@
1#pragma once
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
4
5#if defined(_M_ARM64)
6#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_A64"
7#elif defined(_M_AMD64)
8#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X64"
9#elif defined(_M_ARM)
10#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_ARM"
11#else
12#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X86"
13#endif
diff --git a/src/ca/caSuffix.h b/src/ca/caSuffix.h
deleted file mode 100644
index 303a99e9..00000000
--- a/src/ca/caSuffix.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#pragma once
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
4
5#if defined _WIN64
6#define PLATFORM_DECORATION(f) f L"_64"
7#elif defined ARM
8#define PLATFORM_DECORATION(f) f L"_ARM"
9#else
10#define PLATFORM_DECORATION(f) f
11#endif
diff --git a/src/ca/netshortcuts.cpp b/src/ca/netshortcuts.cpp
index 59ef838b..6ff129db 100644
--- a/src/ca/netshortcuts.cpp
+++ b/src/ca/netshortcuts.cpp
@@ -4,7 +4,7 @@
4 4
5LPCWSTR vcsShortcutsQuery = 5LPCWSTR vcsShortcutsQuery =
6 L"SELECT `Component_`, `Directory_`, `Name`, `Target`, `Attributes`, `IconFile`, `IconIndex` " 6 L"SELECT `Component_`, `Directory_`, `Name`, `Target`, `Attributes`, `IconFile`, `IconIndex` "
7 L"FROM `WixInternetShortcut`"; 7 L"FROM `Wix4InternetShortcut`";
8enum eShortcutsQuery { esqComponent = 1, esqDirectory, esqFilename, esqTarget, esqAttributes, esqIconFile, esqIconIndex }; 8enum eShortcutsQuery { esqComponent = 1, esqDirectory, esqFilename, esqTarget, esqAttributes, esqIconFile, esqIconIndex };
9enum eShortcutsAttributes { esaLink = 0, esaURL = 1 }; 9enum eShortcutsAttributes { esaLink = 0, esaURL = 1 };
10 10
@@ -44,9 +44,9 @@ extern "C" UINT __stdcall WixSchedInternetShortcuts(
44 ExitOnFailure(hr, "failed to initialize WixSchedInternetShortcuts."); 44 ExitOnFailure(hr, "failed to initialize WixSchedInternetShortcuts.");
45 45
46 // anything to do? 46 // anything to do?
47 if (S_OK != WcaTableExists(L"WixInternetShortcut")) 47 if (S_OK != WcaTableExists(L"Wix4InternetShortcut"))
48 { 48 {
49 WcaLog(LOGMSG_STANDARD, "WixInternetShortcut table doesn't exist, so there are no Internet shortcuts to process"); 49 WcaLog(LOGMSG_STANDARD, "Wix4InternetShortcut table doesn't exist, so there are no Internet shortcuts to process");
50 goto LExit; 50 goto LExit;
51 } 51 }
52 52
@@ -71,7 +71,7 @@ extern "C" UINT __stdcall WixSchedInternetShortcuts(
71 71
72 // query and loop through all the shortcuts 72 // query and loop through all the shortcuts
73 hr = WcaOpenExecuteView(vcsShortcutsQuery, &hView); 73 hr = WcaOpenExecuteView(vcsShortcutsQuery, &hView);
74 ExitOnFailure(hr, "failed to open view on WixInternetShortcut table"); 74 ExitOnFailure(hr, "failed to open view on Wix4InternetShortcut table");
75 75
76 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 76 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
77 { 77 {
@@ -91,7 +91,7 @@ extern "C" UINT __stdcall WixSchedInternetShortcuts(
91 hr = WcaGetRecordInteger(hRec, esqIconIndex, &iIconIndex); 91 hr = WcaGetRecordInteger(hRec, esqIconIndex, &iIconIndex);
92 ExitOnFailure(hr, "failed to get shortcut icon index"); 92 ExitOnFailure(hr, "failed to get shortcut icon index");
93 93
94 // skip processing this WixInternetShortcut row if the component isn't being configured 94 // skip processing this Wix4InternetShortcut row if the component isn't being configured
95 WCA_TODO todo = WcaGetComponentToDo(pwzComponent); 95 WCA_TODO todo = WcaGetComponentToDo(pwzComponent);
96 if (WCA_TODO_UNKNOWN == todo) 96 if (WCA_TODO_UNKNOWN == todo)
97 { 97 {
@@ -144,7 +144,7 @@ extern "C" UINT __stdcall WixSchedInternetShortcuts(
144 { 144 {
145 hr = S_OK; 145 hr = S_OK;
146 } 146 }
147 ExitOnFailure(hr, "Failure occured while processing WixInternetShortcut table"); 147 ExitOnFailure(hr, "Failure occured while processing Wix4InternetShortcut table");
148 148
149 // if we have any shortcuts to install 149 // if we have any shortcuts to install
150 if (pwzCustomActionData && *pwzCustomActionData) 150 if (pwzCustomActionData && *pwzCustomActionData)
@@ -154,9 +154,9 @@ extern "C" UINT __stdcall WixSchedInternetShortcuts(
154 ExitOnFailure(hr, "failed to extend progress bar for InternetShortcuts"); 154 ExitOnFailure(hr, "failed to extend progress bar for InternetShortcuts");
155 155
156 // provide custom action data to deferred and rollback CAs 156 // provide custom action data to deferred and rollback CAs
157 hr = WcaSetProperty(PLATFORM_DECORATION(L"WixRollbackInternetShortcuts"), pwzCustomActionData); 157 hr = WcaSetProperty(CUSTOM_ACTION_DECORATION(L"RollbackInternetShortcuts"), pwzCustomActionData);
158 ExitOnFailure(hr, "failed to set WixRollbackInternetShortcuts rollback custom action data"); 158 ExitOnFailure(hr, "failed to set WixRollbackInternetShortcuts rollback custom action data");
159 hr = WcaSetProperty(PLATFORM_DECORATION(L"WixCreateInternetShortcuts"), pwzCustomActionData); 159 hr = WcaSetProperty(CUSTOM_ACTION_DECORATION(L"CreateInternetShortcuts"), pwzCustomActionData);
160 ExitOnFailure(hr, "failed to set WixCreateInternetShortcuts custom action data"); 160 ExitOnFailure(hr, "failed to set WixCreateInternetShortcuts custom action data");
161 } 161 }
162 162
diff --git a/src/ca/precomp.h b/src/ca/precomp.h
index 66e2f6b0..c5d6afe5 100644
--- a/src/ca/precomp.h
+++ b/src/ca/precomp.h
@@ -51,4 +51,4 @@
51#include "scasmb.h" 51#include "scasmb.h"
52#include "scasmbexec.h" 52#include "scasmbexec.h"
53 53
54#include "caSuffix.h" 54#include "caDecor.h"
diff --git a/src/ca/scamanifest.cpp b/src/ca/scamanifest.cpp
index 58b4054d..adb8d3d3 100644
--- a/src/ca/scamanifest.cpp
+++ b/src/ca/scamanifest.cpp
@@ -2,8 +2,8 @@
2 2
3#include "precomp.h" 3#include "precomp.h"
4 4
5LPCWSTR vcsPerfmonManifestQuery = L"SELECT `Component_`, `File`, `ResourceFileDirectory` FROM `PerfmonManifest`"; 5LPCWSTR vcsPerfmonManifestQuery = L"SELECT `Component_`, `File`, `ResourceFileDirectory` FROM `Wix4PerfmonManifest`";
6LPCWSTR vcsEventManifestQuery = L"SELECT `Component_`, `File` FROM `EventManifest`"; 6LPCWSTR vcsEventManifestQuery = L"SELECT `Component_`, `File` FROM `Wix4EventManifest`";
7enum ePerfMonManifestQuery { pfmComponent = 1, pfmFile, pfmResourceFileDir }; 7enum ePerfMonManifestQuery { pfmComponent = 1, pfmFile, pfmResourceFileDir };
8enum eEventManifestQuery { emComponent = 1, emFile}; 8enum eEventManifestQuery { emComponent = 1, emFile};
9 9
@@ -46,9 +46,9 @@ extern "C" UINT __stdcall ConfigurePerfmonManifestRegister(
46 ExitFunction1(hr = S_FALSE); 46 ExitFunction1(hr = S_FALSE);
47 } 47 }
48 // check to see if necessary tables are specified 48 // check to see if necessary tables are specified
49 if (S_OK != WcaTableExists(L"PerfmonManifest")) 49 if (S_OK != WcaTableExists(L"Wix4PerfmonManifest"))
50 { 50 {
51 WcaLog(LOGMSG_VERBOSE, "Skipping ConfigurePerfmonManifestRegister() because PerfmonManifest table not present"); 51 WcaLog(LOGMSG_VERBOSE, "Skipping ConfigurePerfmonManifestRegister() because Wix4PerfmonManifest table not present");
52 ExitFunction1(hr = S_FALSE); 52 ExitFunction1(hr = S_FALSE);
53 } 53 }
54 54
@@ -79,7 +79,7 @@ extern "C" UINT __stdcall ConfigurePerfmonManifestRegister(
79 hr = StrAllocFormatted(&pwzCommand, L"\"unlodctr.exe\" /m:\"%s\"", pwzFile); 79 hr = StrAllocFormatted(&pwzCommand, L"\"unlodctr.exe\" /m:\"%s\"", pwzFile);
80 ExitOnFailure(hr, "failed to copy string in PerfMonManifest"); 80 ExitOnFailure(hr, "failed to copy string in PerfMonManifest");
81 81
82 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"RollbackRegisterPerfmonManifest"), pwzCommand, COST_PERFMONMANIFEST_UNREGISTER); 82 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackRegisterPerfmonManifest"), pwzCommand, COST_PERFMONMANIFEST_UNREGISTER);
83 ExitOnFailure(hr, "failed to schedule RollbackRegisterPerfmonManifest action"); 83 ExitOnFailure(hr, "failed to schedule RollbackRegisterPerfmonManifest action");
84 84
85 if ( *pwzResourceFilePath ) 85 if ( *pwzResourceFilePath )
@@ -95,7 +95,7 @@ extern "C" UINT __stdcall ConfigurePerfmonManifestRegister(
95 95
96 WcaLog(LOGMSG_VERBOSE, "RegisterPerfmonManifest's CustomActionData: '%ls'", pwzCommand); 96 WcaLog(LOGMSG_VERBOSE, "RegisterPerfmonManifest's CustomActionData: '%ls'", pwzCommand);
97 97
98 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"RegisterPerfmonManifest"), pwzCommand, COST_PERFMONMANIFEST_REGISTER); 98 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RegisterPerfmonManifest"), pwzCommand, COST_PERFMONMANIFEST_REGISTER);
99 ExitOnFailure(hr, "failed to schedule RegisterPerfmonManifest action"); 99 ExitOnFailure(hr, "failed to schedule RegisterPerfmonManifest action");
100 } 100 }
101 101
@@ -143,40 +143,40 @@ extern "C" UINT __stdcall ConfigurePerfmonManifestUnregister(
143 ExitFunction1(hr = S_FALSE); 143 ExitFunction1(hr = S_FALSE);
144 } 144 }
145 // check to see if necessary tables are specified 145 // check to see if necessary tables are specified
146 if (WcaTableExists(L"PerfmonManifest") != S_OK) 146 if (WcaTableExists(L"Wix4PerfmonManifest") != S_OK)
147 { 147 {
148 WcaLog(LOGMSG_VERBOSE, "Skipping ConfigurePerfmonManifestUnregister() because PerfmonManifest table not present"); 148 WcaLog(LOGMSG_VERBOSE, "Skipping ConfigurePerfmonManifestUnregister() because Wix4PerfmonManifest table not present");
149 ExitFunction1(hr = S_FALSE); 149 ExitFunction1(hr = S_FALSE);
150 } 150 }
151 151
152 hr = WcaOpenExecuteView(vcsPerfmonManifestQuery, &hView); 152 hr = WcaOpenExecuteView(vcsPerfmonManifestQuery, &hView);
153 ExitOnFailure(hr, "failed to open view on PerfMonManifest table"); 153 ExitOnFailure(hr, "failed to open view on Wix4PerfmonManifest table");
154 while ((hr = WcaFetchRecord(hView, &hRec)) == S_OK) 154 while ((hr = WcaFetchRecord(hView, &hRec)) == S_OK)
155 { 155 {
156 // get component install state 156 // get component install state
157 hr = WcaGetRecordString(hRec, pfmComponent, &pwzData); 157 hr = WcaGetRecordString(hRec, pfmComponent, &pwzData);
158 ExitOnFailure(hr, "failed to get Component for PerfMonManifest"); 158 ExitOnFailure(hr, "failed to get Component for Wix4PerfmonManifest");
159 er = ::MsiGetComponentStateW(hInstall, pwzData, &isInstalled, &isAction); 159 er = ::MsiGetComponentStateW(hInstall, pwzData, &isInstalled, &isAction);
160 hr = HRESULT_FROM_WIN32(er); 160 hr = HRESULT_FROM_WIN32(er);
161 ExitOnFailure(hr, "failed to get Component state for PerfMonManifest"); 161 ExitOnFailure(hr, "failed to get Component state for Wix4PerfmonManifest");
162 if (!WcaIsUninstalling(isInstalled, isAction)) 162 if (!WcaIsUninstalling(isInstalled, isAction))
163 { 163 {
164 continue; 164 continue;
165 } 165 }
166 166
167 hr = WcaGetRecordFormattedString(hRec, pfmFile, &pwzFile); 167 hr = WcaGetRecordFormattedString(hRec, pfmFile, &pwzFile);
168 ExitOnFailure(hr, "failed to get File for PerfMonManifest"); 168 ExitOnFailure(hr, "failed to get File for Wix4PerfmonManifest");
169 169
170 hr = WcaGetRecordFormattedString(hRec, pfmResourceFileDir, &pwzResourceFilePath); 170 hr = WcaGetRecordFormattedString(hRec, pfmResourceFileDir, &pwzResourceFilePath);
171 ExitOnFailure(hr, "failed to get ApplicationIdentity for PerfMonManifest"); 171 ExitOnFailure(hr, "failed to get ApplicationIdentity for Wix4PerfmonManifest");
172 size_t iResourcePath = lstrlenW(pwzResourceFilePath); 172 size_t iResourcePath = lstrlenW(pwzResourceFilePath);
173 if ( iResourcePath > 0 && *(pwzResourceFilePath + iResourcePath -1) == L'\\') 173 if ( iResourcePath > 0 && *(pwzResourceFilePath + iResourcePath -1) == L'\\')
174 *(pwzResourceFilePath + iResourcePath -1) = 0; //remove the trailing '\' 174 *(pwzResourceFilePath + iResourcePath -1) = 0; //remove the trailing '\'
175 175
176 hr = StrAllocFormatted(&pwzCommand, L"\"lodctr.exe\" /m:\"%s\" \"%s\"", pwzFile, pwzResourceFilePath); 176 hr = StrAllocFormatted(&pwzCommand, L"\"lodctr.exe\" /m:\"%s\" \"%s\"", pwzFile, pwzResourceFilePath);
177 ExitOnFailure(hr, "failed to copy string in PerfMonManifest"); 177 ExitOnFailure(hr, "failed to copy string in Wix4PerfmonManifest");
178 178
179 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"RollbackUnregisterPerfmonManifest"), pwzCommand, COST_PERFMONMANIFEST_REGISTER); 179 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackUnregisterPerfmonManifest"), pwzCommand, COST_PERFMONMANIFEST_REGISTER);
180 ExitOnFailure(hr, "failed to schedule RollbackUnregisterPerfmonManifest action"); 180 ExitOnFailure(hr, "failed to schedule RollbackUnregisterPerfmonManifest action");
181 181
182 hr = StrAllocFormatted(&pwzCommand, L"\"unlodctr.exe\" /m:\"%s\"", pwzFile); 182 hr = StrAllocFormatted(&pwzCommand, L"\"unlodctr.exe\" /m:\"%s\"", pwzFile);
@@ -184,7 +184,7 @@ extern "C" UINT __stdcall ConfigurePerfmonManifestUnregister(
184 184
185 WcaLog(LOGMSG_VERBOSE, "UnRegisterPerfmonManifest's CustomActionData: '%ls'", pwzCommand); 185 WcaLog(LOGMSG_VERBOSE, "UnRegisterPerfmonManifest's CustomActionData: '%ls'", pwzCommand);
186 186
187 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"UnregisterPerfmonManifest"), pwzCommand, COST_PERFMONMANIFEST_UNREGISTER); 187 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"UnregisterPerfmonManifest"), pwzCommand, COST_PERFMONMANIFEST_UNREGISTER);
188 ExitOnFailure(hr, "failed to schedule UnregisterPerfmonManifest action"); 188 ExitOnFailure(hr, "failed to schedule UnregisterPerfmonManifest action");
189 } 189 }
190 190
@@ -231,41 +231,41 @@ extern "C" UINT __stdcall ConfigureEventManifestRegister(
231 ExitFunction1(hr = S_FALSE); 231 ExitFunction1(hr = S_FALSE);
232 } 232 }
233 // check to see if necessary tables are specified 233 // check to see if necessary tables are specified
234 if (S_OK != WcaTableExists(L"EventManifest")) 234 if (S_OK != WcaTableExists(L"Wix4EventManifest"))
235 { 235 {
236 WcaLog(LOGMSG_VERBOSE, "Skipping ConfigureEventManifestRegister() because EventManifest table not present"); 236 WcaLog(LOGMSG_VERBOSE, "Skipping ConfigureEventManifestRegister() because Wix4EventManifest table not present");
237 ExitFunction1(hr = S_FALSE); 237 ExitFunction1(hr = S_FALSE);
238 } 238 }
239 239
240 hr = WcaOpenExecuteView(vcsEventManifestQuery, &hView); 240 hr = WcaOpenExecuteView(vcsEventManifestQuery, &hView);
241 ExitOnFailure(hr, "failed to open view on EventManifest table"); 241 ExitOnFailure(hr, "failed to open view on Wix4EventManifest table");
242 while ((hr = WcaFetchRecord(hView, &hRec)) == S_OK) 242 while ((hr = WcaFetchRecord(hView, &hRec)) == S_OK)
243 { 243 {
244 // get component install state 244 // get component install state
245 hr = WcaGetRecordString(hRec, emComponent, &pwzData); 245 hr = WcaGetRecordString(hRec, emComponent, &pwzData);
246 ExitOnFailure(hr, "failed to get Component for EventManifest"); 246 ExitOnFailure(hr, "failed to get Component for Wix4EventManifest");
247 er = ::MsiGetComponentStateW(hInstall, pwzData, &isInstalled, &isAction); 247 er = ::MsiGetComponentStateW(hInstall, pwzData, &isInstalled, &isAction);
248 hr = HRESULT_FROM_WIN32(er); 248 hr = HRESULT_FROM_WIN32(er);
249 ExitOnFailure(hr, "failed to get Component state for EventManifest"); 249 ExitOnFailure(hr, "failed to get Component state for Wix4EventManifest");
250 if (!WcaIsInstalling(isInstalled, isAction)) 250 if (!WcaIsInstalling(isInstalled, isAction))
251 { 251 {
252 continue; 252 continue;
253 } 253 }
254 254
255 hr = WcaGetRecordFormattedString(hRec, emFile, &pwzFile); 255 hr = WcaGetRecordFormattedString(hRec, emFile, &pwzFile);
256 ExitOnFailure(hr, "failed to get File for EventManifest"); 256 ExitOnFailure(hr, "failed to get File for Wix4EventManifest");
257 257
258 hr = StrAllocFormatted(&pwzCommand, L"\"wevtutil.exe\" um \"%s\"", pwzFile); 258 hr = StrAllocFormatted(&pwzCommand, L"\"wevtutil.exe\" um \"%s\"", pwzFile);
259 ExitOnFailure(hr, "failed to copy string in EventManifest"); 259 ExitOnFailure(hr, "failed to copy string in Wix4EventManifest");
260 260
261 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"RollbackRegisterEventManifest"), pwzCommand, COST_PERFMONMANIFEST_UNREGISTER); 261 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackRegisterEventManifest"), pwzCommand, COST_PERFMONMANIFEST_UNREGISTER);
262 ExitOnFailure(hr, "failed to schedule RollbackRegisterEventManifest action"); 262 ExitOnFailure(hr, "failed to schedule RollbackRegisterEventManifest action");
263 263
264 hr = StrAllocFormatted(&pwzCommand, L"\"wevtutil.exe\" im \"%s\"", pwzFile); 264 hr = StrAllocFormatted(&pwzCommand, L"\"wevtutil.exe\" im \"%s\"", pwzFile);
265 ExitOnFailure(hr, "failed to copy string in EventManifest"); 265 ExitOnFailure(hr, "failed to copy string in Wix4EventManifest");
266 WcaLog(LOGMSG_VERBOSE, "RegisterEventManifest's CustomActionData: '%ls'", pwzCommand); 266 WcaLog(LOGMSG_VERBOSE, "RegisterEventManifest's CustomActionData: '%ls'", pwzCommand);
267 267
268 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"RegisterEventManifest"), pwzCommand, COST_EVENTMANIFEST_REGISTER); 268 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RegisterEventManifest"), pwzCommand, COST_EVENTMANIFEST_REGISTER);
269 ExitOnFailure(hr, "failed to schedule RegisterEventManifest action"); 269 ExitOnFailure(hr, "failed to schedule RegisterEventManifest action");
270 } 270 }
271 271
@@ -273,7 +273,7 @@ extern "C" UINT __stdcall ConfigureEventManifestRegister(
273 { 273 {
274 hr = S_OK; 274 hr = S_OK;
275 } 275 }
276 ExitOnFailure(hr, "Failure while processing EventManifest"); 276 ExitOnFailure(hr, "Failure while processing Wix4EventManifest");
277 277
278 hr = S_OK; 278 hr = S_OK;
279 279
@@ -313,22 +313,22 @@ extern "C" UINT __stdcall ConfigureEventManifestUnregister(
313 ExitFunction1(hr = S_FALSE); 313 ExitFunction1(hr = S_FALSE);
314 } 314 }
315 // check to see if necessary tables are specified 315 // check to see if necessary tables are specified
316 if (S_OK != WcaTableExists(L"EventManifest")) 316 if (S_OK != WcaTableExists(L"Wix4EventManifest"))
317 { 317 {
318 WcaLog(LOGMSG_VERBOSE, "Skipping ConfigureEventManifestUnregister() because EventManifest table not present"); 318 WcaLog(LOGMSG_VERBOSE, "Skipping ConfigureEventManifestUnregister() because Wix4EventManifest table not present");
319 ExitFunction1(hr = S_FALSE); 319 ExitFunction1(hr = S_FALSE);
320 } 320 }
321 321
322 hr = WcaOpenExecuteView(vcsEventManifestQuery, &hView); 322 hr = WcaOpenExecuteView(vcsEventManifestQuery, &hView);
323 ExitOnFailure(hr, "failed to open view on EventManifest table"); 323 ExitOnFailure(hr, "failed to open view on Wix4EventManifest table");
324 while ((hr = WcaFetchRecord(hView, &hRec)) == S_OK) 324 while ((hr = WcaFetchRecord(hView, &hRec)) == S_OK)
325 { 325 {
326 // get component install state 326 // get component install state
327 hr = WcaGetRecordString(hRec, emComponent, &pwzData); 327 hr = WcaGetRecordString(hRec, emComponent, &pwzData);
328 ExitOnFailure(hr, "failed to get Component for EventManifest"); 328 ExitOnFailure(hr, "failed to get Component for Wix4EventManifest");
329 er = ::MsiGetComponentStateW(hInstall, pwzData, &isInstalled, &isAction); 329 er = ::MsiGetComponentStateW(hInstall, pwzData, &isInstalled, &isAction);
330 hr = HRESULT_FROM_WIN32(er); 330 hr = HRESULT_FROM_WIN32(er);
331 ExitOnFailure(hr, "failed to get Component state for EventManifest"); 331 ExitOnFailure(hr, "failed to get Component state for Wix4EventManifest");
332 332
333 // nothing to do on an install 333 // nothing to do on an install
334 // schedule the rollback action when reinstalling to re-register pre-patch manifest 334 // schedule the rollback action when reinstalling to re-register pre-patch manifest
@@ -338,22 +338,22 @@ extern "C" UINT __stdcall ConfigureEventManifestUnregister(
338 } 338 }
339 339
340 hr = WcaGetRecordFormattedString(hRec, emFile, &pwzFile); 340 hr = WcaGetRecordFormattedString(hRec, emFile, &pwzFile);
341 ExitOnFailure(hr, "failed to get File for EventManifest"); 341 ExitOnFailure(hr, "failed to get File for Wix4EventManifest");
342 342
343 hr = StrAllocFormatted(&pwzCommand, L"\"wevtutil.exe\" im \"%s\"", pwzFile); 343 hr = StrAllocFormatted(&pwzCommand, L"\"wevtutil.exe\" im \"%s\"", pwzFile);
344 ExitOnFailure(hr, "failed to copy string in EventManifest"); 344 ExitOnFailure(hr, "failed to copy string in Wix4EventManifest");
345 345
346 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"RollbackUnregisterEventManifest"), pwzCommand, COST_PERFMONMANIFEST_REGISTER); 346 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackUnregisterEventManifest"), pwzCommand, COST_PERFMONMANIFEST_REGISTER);
347 ExitOnFailure(hr, "failed to schedule RollbackUnregisterEventManifest action"); 347 ExitOnFailure(hr, "failed to schedule RollbackUnregisterEventManifest action");
348 348
349 // no need to uninstall on a repair/patch. Register action will re-register and update the manifest. 349 // no need to uninstall on a repair/patch. Register action will re-register and update the manifest.
350 if (!WcaIsReInstalling(isInstalled, isAction)) 350 if (!WcaIsReInstalling(isInstalled, isAction))
351 { 351 {
352 hr = StrAllocFormatted(&pwzCommand, L"\"wevtutil.exe\" um \"%s\"", pwzFile); 352 hr = StrAllocFormatted(&pwzCommand, L"\"wevtutil.exe\" um \"%s\"", pwzFile);
353 ExitOnFailure(hr, "failed to copy string in EventManifest"); 353 ExitOnFailure(hr, "failed to copy string in Wix4EventManifest");
354 WcaLog(LOGMSG_VERBOSE, "UnregisterEventManifest's CustomActionData: '%ls'", pwzCommand); 354 WcaLog(LOGMSG_VERBOSE, "UnregisterEventManifest's CustomActionData: '%ls'", pwzCommand);
355 355
356 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"UnregisterEventManifest"), pwzCommand, COST_PERFMONMANIFEST_UNREGISTER); 356 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"UnregisterEventManifest"), pwzCommand, COST_PERFMONMANIFEST_UNREGISTER);
357 ExitOnFailure(hr, "failed to schedule UnregisterEventManifest action"); 357 ExitOnFailure(hr, "failed to schedule UnregisterEventManifest action");
358 } 358 }
359 } 359 }
@@ -362,7 +362,7 @@ extern "C" UINT __stdcall ConfigureEventManifestUnregister(
362 { 362 {
363 hr = S_OK; 363 hr = S_OK;
364 } 364 }
365 ExitOnFailure(hr, "Failure while processing EventManifest"); 365 ExitOnFailure(hr, "Failure while processing Wix4EventManifest");
366 366
367 hr = S_OK; 367 hr = S_OK;
368 368
diff --git a/src/ca/scaperf.cpp b/src/ca/scaperf.cpp
index 82f458af..fd301278 100644
--- a/src/ca/scaperf.cpp
+++ b/src/ca/scaperf.cpp
@@ -2,10 +2,10 @@
2 2
3#include "precomp.h" 3#include "precomp.h"
4 4
5LPCWSTR vcsPerfCounterDataQuery = L"SELECT `PerformanceCategory`, `Component_`, `Name`, `IniData`, `ConstantData` FROM `PerformanceCategory`"; 5LPCWSTR vcsPerfCounterDataQuery = L"SELECT `Wix4PerformanceCategory`, `Component_`, `Name`, `IniData`, `ConstantData` FROM `Wix4PerformanceCategory`";
6enum ePerfCounterDataQuery { pcdqId = 1, pcdqComponent, pcdqName, pcdqIniData, pcdqConstantData }; 6enum ePerfCounterDataQuery { pcdqId = 1, pcdqComponent, pcdqName, pcdqIniData, pcdqConstantData };
7 7
8LPCWSTR vcsPerfMonQuery = L"SELECT `Component_`, `File`, `Name` FROM `Perfmon`"; 8LPCWSTR vcsPerfMonQuery = L"SELECT `Component_`, `File`, `Name` FROM `Wix4Perfmon`";
9enum ePerfMonQuery { pmqComponent = 1, pmqFile, pmqName }; 9enum ePerfMonQuery { pmqComponent = 1, pmqFile, pmqName };
10 10
11 11
@@ -32,7 +32,7 @@ extern "C" UINT __stdcall InstallPerfCounterData(
32 ExitOnFailure(hr, "Failed to initialize InstallPerfCounterData."); 32 ExitOnFailure(hr, "Failed to initialize InstallPerfCounterData.");
33 33
34 hr = ProcessPerformanceCategory(hInstall, TRUE); 34 hr = ProcessPerformanceCategory(hInstall, TRUE);
35 MessageExitOnFailure(hr, msierrInstallPerfCounterData, "Failed to process PerformanceCategory table."); 35 MessageExitOnFailure(hr, msierrInstallPerfCounterData, "Failed to process Wix4PerformanceCategory table.");
36 36
37LExit: 37LExit:
38 er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; 38 er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
@@ -57,7 +57,7 @@ extern "C" UINT __stdcall UninstallPerfCounterData(
57 ExitOnFailure(hr, "Failed to initialize UninstallPerfCounterData."); 57 ExitOnFailure(hr, "Failed to initialize UninstallPerfCounterData.");
58 58
59 hr = ProcessPerformanceCategory(hInstall, FALSE); 59 hr = ProcessPerformanceCategory(hInstall, FALSE);
60 MessageExitOnFailure(hr, msierrUninstallPerfCounterData, "Failed to process PerformanceCategory table."); 60 MessageExitOnFailure(hr, msierrUninstallPerfCounterData, "Failed to process Wix4PerformanceCategory table.");
61 61
62LExit: 62LExit:
63 er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; 63 er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
@@ -85,9 +85,9 @@ extern "C" UINT __stdcall ConfigurePerfmonInstall(
85 ExitOnFailure(hr, "Failed to initialize"); 85 ExitOnFailure(hr, "Failed to initialize");
86 86
87 // check to see if necessary tables are specified 87 // check to see if necessary tables are specified
88 if (S_OK != WcaTableExists(L"Perfmon")) 88 if (S_OK != WcaTableExists(L"Wix4Perfmon"))
89 { 89 {
90 WcaLog(LOGMSG_VERBOSE, "Skipping RegisterPerfmon() because Perfmon table not present"); 90 WcaLog(LOGMSG_VERBOSE, "Skipping RegisterPerfmon() because Wix4Perfmon table not present");
91 ExitFunction1(hr = S_FALSE); 91 ExitFunction1(hr = S_FALSE);
92 } 92 }
93 93
@@ -113,9 +113,9 @@ extern "C" UINT __stdcall ConfigurePerfmonInstall(
113 ExitOnFailure(hr, "failed to get File for PerfMon"); 113 ExitOnFailure(hr, "failed to get File for PerfMon");
114 114
115 WcaLog(LOGMSG_VERBOSE, "ConfigurePerfmonInstall's CustomActionData: '%ls', '%ls'", pwzName, pwzFile); 115 WcaLog(LOGMSG_VERBOSE, "ConfigurePerfmonInstall's CustomActionData: '%ls', '%ls'", pwzName, pwzFile);
116 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"RegisterPerfmon"), pwzFile, COST_PERFMON_REGISTER); 116 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RegisterPerfmon"), pwzFile, COST_PERFMON_REGISTER);
117 ExitOnFailure(hr, "failed to schedule RegisterPerfmon action"); 117 ExitOnFailure(hr, "failed to schedule RegisterPerfmon action");
118 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"RollbackRegisterPerfmon"), pwzName, COST_PERFMON_UNREGISTER); 118 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackRegisterPerfmon"), pwzName, COST_PERFMON_UNREGISTER);
119 ExitOnFailure(hr, "failed to schedule RollbackRegisterPerfmon action"); 119 ExitOnFailure(hr, "failed to schedule RollbackRegisterPerfmon action");
120 } 120 }
121 121
@@ -158,9 +158,9 @@ extern "C" UINT __stdcall ConfigurePerfmonUninstall(
158 ExitOnFailure(hr, "Failed to initialize"); 158 ExitOnFailure(hr, "Failed to initialize");
159 159
160 // check to see if necessary tables are specified 160 // check to see if necessary tables are specified
161 if (WcaTableExists(L"Perfmon") != S_OK) 161 if (WcaTableExists(L"Wix4Perfmon") != S_OK)
162 { 162 {
163 WcaLog(LOGMSG_VERBOSE, "Skipping UnregisterPerfmon() because Perfmon table not present"); 163 WcaLog(LOGMSG_VERBOSE, "Skipping UnregisterPerfmon() because Wix4Perfmon table not present");
164 ExitFunction1(hr = S_FALSE); 164 ExitFunction1(hr = S_FALSE);
165 } 165 }
166 166
@@ -186,9 +186,9 @@ extern "C" UINT __stdcall ConfigurePerfmonUninstall(
186 ExitOnFailure(hr, "failed to get File for PerfMon"); 186 ExitOnFailure(hr, "failed to get File for PerfMon");
187 187
188 WcaLog(LOGMSG_VERBOSE, "ConfigurePerfmonUninstall's CustomActionData: '%ls', '%ls'", pwzName, pwzFile); 188 WcaLog(LOGMSG_VERBOSE, "ConfigurePerfmonUninstall's CustomActionData: '%ls', '%ls'", pwzName, pwzFile);
189 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"UnregisterPerfmon"), pwzName, COST_PERFMON_UNREGISTER); 189 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"UnregisterPerfmon"), pwzName, COST_PERFMON_UNREGISTER);
190 ExitOnFailure(hr, "failed to schedule UnregisterPerfmon action"); 190 ExitOnFailure(hr, "failed to schedule UnregisterPerfmon action");
191 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"RollbackUnregisterPerfmon"), pwzFile, COST_PERFMON_REGISTER); 191 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackUnregisterPerfmon"), pwzFile, COST_PERFMON_REGISTER);
192 ExitOnFailure(hr, "failed to schedule RollbackUnregisterPerfmon action"); 192 ExitOnFailure(hr, "failed to schedule RollbackUnregisterPerfmon action");
193 } 193 }
194 194
@@ -229,26 +229,26 @@ static HRESULT ProcessPerformanceCategory(
229 LPWSTR pwzCustomActionData = NULL; 229 LPWSTR pwzCustomActionData = NULL;
230 230
231 // check to see if necessary tables are specified 231 // check to see if necessary tables are specified
232 if (S_OK != WcaTableExists(L"PerformanceCategory")) 232 if (S_OK != WcaTableExists(L"Wix4PerformanceCategory"))
233 { 233 {
234 ExitFunction1(hr = S_FALSE); 234 ExitFunction1(hr = S_FALSE);
235 } 235 }
236 236
237 hr = WcaOpenExecuteView(vcsPerfCounterDataQuery, &hView); 237 hr = WcaOpenExecuteView(vcsPerfCounterDataQuery, &hView);
238 ExitOnFailure(hr, "failed to open view on PerformanceCategory table"); 238 ExitOnFailure(hr, "failed to open view on Wix4PerformanceCategory table");
239 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 239 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
240 { 240 {
241 hr = WcaGetRecordString(hRec, pcdqId, &pwzId); 241 hr = WcaGetRecordString(hRec, pcdqId, &pwzId);
242 ExitOnFailure(hr, "Failed to get id for PerformanceCategory."); 242 ExitOnFailure(hr, "Failed to get id for Wix4PerformanceCategory.");
243 243
244 // Check to see if the Component is being installed or uninstalled 244 // Check to see if the Component is being installed or uninstalled
245 // when we are processing the same. 245 // when we are processing the same.
246 hr = WcaGetRecordString(hRec, pcdqComponent, &pwzComponent); 246 hr = WcaGetRecordString(hRec, pcdqComponent, &pwzComponent);
247 ExitOnFailure(hr, "Failed to get Component for PerformanceCategory: %ls", pwzId); 247 ExitOnFailure(hr, "Failed to get Component for Wix4PerformanceCategory: %ls", pwzId);
248 248
249 er = ::MsiGetComponentStateW(hInstall, pwzComponent, &isInstalled, &isAction); 249 er = ::MsiGetComponentStateW(hInstall, pwzComponent, &isInstalled, &isAction);
250 hr = HRESULT_FROM_WIN32(er); 250 hr = HRESULT_FROM_WIN32(er);
251 ExitOnFailure(hr, "Failed to get Component state for PerformanceCategory: %ls", pwzId); 251 ExitOnFailure(hr, "Failed to get Component state for Wix4PerformanceCategory: %ls", pwzId);
252 252
253 if ((fInstall && !WcaIsInstalling(isInstalled, isAction)) || 253 if ((fInstall && !WcaIsInstalling(isInstalled, isAction)) ||
254 (!fInstall && !WcaIsUninstalling(isInstalled, isAction))) 254 (!fInstall && !WcaIsUninstalling(isInstalled, isAction)))
@@ -257,45 +257,45 @@ static HRESULT ProcessPerformanceCategory(
257 } 257 }
258 258
259 hr = WcaGetRecordString(hRec, pcdqName, &pwzName); 259 hr = WcaGetRecordString(hRec, pcdqName, &pwzName);
260 ExitOnFailure(hr, "Failed to get Name for PerformanceCategory: %ls", pwzId); 260 ExitOnFailure(hr, "Failed to get Name for Wix4PerformanceCategory: %ls", pwzId);
261 hr = WcaWriteStringToCaData(pwzName, &pwzCustomActionData); 261 hr = WcaWriteStringToCaData(pwzName, &pwzCustomActionData);
262 ExitOnFailure(hr, "Failed to add Name to CustomActionData for PerformanceCategory: %ls", pwzId); 262 ExitOnFailure(hr, "Failed to add Name to CustomActionData for Wix4PerformanceCategory: %ls", pwzId);
263 263
264 hr = WcaGetRecordString(hRec, pcdqIniData, &pwzData); 264 hr = WcaGetRecordString(hRec, pcdqIniData, &pwzData);
265 ExitOnFailure(hr, "Failed to get IniData for PerformanceCategory: %ls", pwzId); 265 ExitOnFailure(hr, "Failed to get IniData for Wix4PerformanceCategory: %ls", pwzId);
266 hr = WcaWriteStringToCaData(pwzData, &pwzCustomActionData); 266 hr = WcaWriteStringToCaData(pwzData, &pwzCustomActionData);
267 ExitOnFailure(hr, "Failed to add IniData to CustomActionData for PerformanceCategory: %ls", pwzId); 267 ExitOnFailure(hr, "Failed to add IniData to CustomActionData for Wix4PerformanceCategory: %ls", pwzId);
268 268
269 hr = WcaGetRecordString(hRec, pcdqConstantData, &pwzData); 269 hr = WcaGetRecordString(hRec, pcdqConstantData, &pwzData);
270 ExitOnFailure(hr, "Failed to get ConstantData for PerformanceCategory: %ls", pwzId); 270 ExitOnFailure(hr, "Failed to get ConstantData for Wix4PerformanceCategory: %ls", pwzId);
271 hr = WcaWriteStringToCaData(pwzData, &pwzCustomActionData); 271 hr = WcaWriteStringToCaData(pwzData, &pwzCustomActionData);
272 ExitOnFailure(hr, "Failed to add ConstantData to CustomActionData for PerformanceCategory: %ls", pwzId); 272 ExitOnFailure(hr, "Failed to add ConstantData to CustomActionData for Wix4PerformanceCategory: %ls", pwzId);
273 } 273 }
274 274
275 if (hr == E_NOMOREITEMS) 275 if (hr == E_NOMOREITEMS)
276 { 276 {
277 hr = S_OK; 277 hr = S_OK;
278 } 278 }
279 ExitOnFailure(hr, "Failure while processing PerformanceCategory table."); 279 ExitOnFailure(hr, "Failure while processing Wix4PerformanceCategory table.");
280 280
281 // If there was any data built up, schedule it for execution. 281 // If there was any data built up, schedule it for execution.
282 if (pwzCustomActionData) 282 if (pwzCustomActionData)
283 { 283 {
284 if (fInstall) 284 if (fInstall)
285 { 285 {
286 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"RollbackRegisterPerfCounterData"), pwzCustomActionData, COST_PERFMON_UNREGISTER); 286 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackRegisterPerfCounterData"), pwzCustomActionData, COST_PERFMON_UNREGISTER);
287 ExitOnFailure(hr, "Failed to schedule RollbackRegisterPerfCounterData action for PerformanceCategory: %ls", pwzId); 287 ExitOnFailure(hr, "Failed to schedule RollbackRegisterPerfCounterData action for Wix4PerformanceCategory: %ls", pwzId);
288 288
289 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"RegisterPerfCounterData"), pwzCustomActionData, COST_PERFMON_REGISTER); 289 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RegisterPerfCounterData"), pwzCustomActionData, COST_PERFMON_REGISTER);
290 ExitOnFailure(hr, "Failed to schedule RegisterPerfCounterData action for PerformanceCategory: %ls", pwzId); 290 ExitOnFailure(hr, "Failed to schedule RegisterPerfCounterData action for Wix4PerformanceCategory: %ls", pwzId);
291 } 291 }
292 else 292 else
293 { 293 {
294 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"RollbackUnregisterPerfCounterData"), pwzCustomActionData, COST_PERFMON_REGISTER); 294 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackUnregisterPerfCounterData"), pwzCustomActionData, COST_PERFMON_REGISTER);
295 ExitOnFailure(hr, "Failed to schedule RollbackUnregisterPerfCounterData action for PerformanceCategory: %ls", pwzId); 295 ExitOnFailure(hr, "Failed to schedule RollbackUnregisterPerfCounterData action for Wix4PerformanceCategory: %ls", pwzId);
296 296
297 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"UnregisterPerfCounterData"), pwzCustomActionData, COST_PERFMON_UNREGISTER); 297 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"UnregisterPerfCounterData"), pwzCustomActionData, COST_PERFMON_UNREGISTER);
298 ExitOnFailure(hr, "Failed to schedule UnregisterPerfCounterData action for PerformanceCategory: %ls", pwzId); 298 ExitOnFailure(hr, "Failed to schedule UnregisterPerfCounterData action for Wix4PerformanceCategory: %ls", pwzId);
299 } 299 }
300 } 300 }
301 301
diff --git a/src/ca/scaperfexec.cpp b/src/ca/scaperfexec.cpp
index bf58c8d0..04c0648a 100644
--- a/src/ca/scaperfexec.cpp
+++ b/src/ca/scaperfexec.cpp
@@ -35,7 +35,7 @@ extern "C" UINT __stdcall RegisterPerfCounterData(
35 ExitOnFailure(hr, "Failed to initialize RegisterPerfCounterData."); 35 ExitOnFailure(hr, "Failed to initialize RegisterPerfCounterData.");
36 36
37 hr = ExecutePerfCounterData(hInstall, TRUE); 37 hr = ExecutePerfCounterData(hInstall, TRUE);
38 MessageExitOnFailure(hr, msierrInstallPerfCounterData, "Failed to execute PerformanceCategory table."); 38 MessageExitOnFailure(hr, msierrInstallPerfCounterData, "Failed to execute Wix4PerformanceCategory table.");
39 39
40LExit: 40LExit:
41 er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; 41 er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
@@ -61,7 +61,7 @@ extern "C" UINT __stdcall UnregisterPerfCounterData(
61 ExitOnFailure(hr, "Failed to initialize UnregisterPerfCounterData."); 61 ExitOnFailure(hr, "Failed to initialize UnregisterPerfCounterData.");
62 62
63 hr = ExecutePerfCounterData(hInstall, FALSE); 63 hr = ExecutePerfCounterData(hInstall, FALSE);
64 MessageExitOnFailure(hr, msierrUninstallPerfCounterData, "Failed to execute PerformanceCategory table."); 64 MessageExitOnFailure(hr, msierrUninstallPerfCounterData, "Failed to execute Wix4PerformanceCategory table.");
65 65
66LExit: 66LExit:
67 er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; 67 er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
diff --git a/src/ca/scasched.cpp b/src/ca/scasched.cpp
index ba230a9e..d81b1f14 100644
--- a/src/ca/scasched.cpp
+++ b/src/ca/scasched.cpp
@@ -21,14 +21,14 @@ extern "C" UINT __stdcall ConfigureSmbInstall(
21 ExitOnFailure(hr, "Failed to initialize"); 21 ExitOnFailure(hr, "Failed to initialize");
22 22
23 // check to see if necessary tables are specified 23 // check to see if necessary tables are specified
24 if (WcaTableExists(L"FileShare") != S_OK) 24 if (WcaTableExists(L"Wix4FileShare") != S_OK)
25 { 25 {
26 WcaLog(LOGMSG_VERBOSE, "Skipping SMB CustomAction, no FileShare table"); 26 WcaLog(LOGMSG_VERBOSE, "Skipping SMB CustomAction, no Wix4FileShare table");
27 ExitFunction1(hr = S_FALSE); 27 ExitFunction1(hr = S_FALSE);
28 } 28 }
29 29
30 hr = ScaSmbRead(&pssList); 30 hr = ScaSmbRead(&pssList);
31 ExitOnFailure(hr, "failed to read FileShare table"); 31 ExitOnFailure(hr, "failed to read Wix4FileShare table");
32 32
33 hr = ScaSmbInstall(pssList); 33 hr = ScaSmbInstall(pssList);
34 ExitOnFailure(hr, "failed to install FileShares"); 34 ExitOnFailure(hr, "failed to install FileShares");
@@ -43,7 +43,7 @@ LExit:
43 43
44 44
45/******************************************************************** 45/********************************************************************
46ConfigureSmb - CUSTOM ACTION ENTRY POINT for installing fileshare settings 46ConfigureSmb - CUSTOM ACTION ENTRY POINT for uninstalling fileshare settings
47 47
48********************************************************************/ 48********************************************************************/
49extern "C" UINT __stdcall ConfigureSmbUninstall( 49extern "C" UINT __stdcall ConfigureSmbUninstall(
@@ -60,14 +60,14 @@ extern "C" UINT __stdcall ConfigureSmbUninstall(
60 ExitOnFailure(hr, "Failed to initialize"); 60 ExitOnFailure(hr, "Failed to initialize");
61 61
62 // check to see if necessary tables are specified 62 // check to see if necessary tables are specified
63 if (WcaTableExists(L"FileShare") != S_OK) 63 if (WcaTableExists(L"Wix4FileShare") != S_OK)
64 { 64 {
65 WcaLog(LOGMSG_VERBOSE, "Skipping SMB CustomAction, no FileShare table"); 65 WcaLog(LOGMSG_VERBOSE, "Skipping SMB CustomAction, no Wix4FileShare table");
66 ExitFunction1(hr = S_FALSE); 66 ExitFunction1(hr = S_FALSE);
67 } 67 }
68 68
69 hr = ScaSmbRead(&pssList); 69 hr = ScaSmbRead(&pssList);
70 ExitOnFailure(hr, "failed to read FileShare table"); 70 ExitOnFailure(hr, "failed to read Wix4FileShare table");
71 71
72 hr = ScaSmbUninstall(pssList); 72 hr = ScaSmbUninstall(pssList);
73 ExitOnFailure(hr, "failed to uninstall FileShares"); 73 ExitOnFailure(hr, "failed to uninstall FileShares");
@@ -106,7 +106,7 @@ extern "C" UINT __stdcall ConfigureUsers(
106 fInitializedCom = TRUE; 106 fInitializedCom = TRUE;
107 107
108 hr = ScaUserRead(&psuList); 108 hr = ScaUserRead(&psuList);
109 ExitOnFailure(hr, "failed to read User table"); 109 ExitOnFailure(hr, "failed to read Wix4User table");
110 110
111 hr = ScaUserExecute(psuList); 111 hr = ScaUserExecute(psuList);
112 ExitOnFailure(hr, "failed to add/remove User actions"); 112 ExitOnFailure(hr, "failed to add/remove User actions");
diff --git a/src/ca/scasmb.h b/src/ca/scasmb.h
index 7dbeb14d..f2a4b53c 100644
--- a/src/ca/scasmb.h
+++ b/src/ca/scasmb.h
@@ -5,7 +5,7 @@
5#include "scauser.h" 5#include "scauser.h"
6 6
7// structs 7// structs
8// Structure used to hold and extra user/permission pairs from the FileSharePermissions Table 8// Structure used to hold and extra user/permission pairs from the Wix4FileSharePermissions Table
9struct SCA_SMB_EX_USER_PERMS 9struct SCA_SMB_EX_USER_PERMS
10{ 10{
11 int nPermissions; 11 int nPermissions;
diff --git a/src/ca/scasmbsched.cpp b/src/ca/scasmbsched.cpp
index 72536d6d..e29f7f51 100644
--- a/src/ca/scasmbsched.cpp
+++ b/src/ca/scasmbsched.cpp
@@ -92,8 +92,8 @@ void ScaExUserPermsSmbFreeList(SCA_SMB_EX_USER_PERMS* pExUserPermsList)
92} 92}
93 93
94// sql query constants 94// sql query constants
95LPCWSTR vcsSmbQuery = L"SELECT `FileShare`, `ShareName`, `Description`, `Directory_`, " 95LPCWSTR vcsSmbQuery = L"SELECT `Wix4FileShare`, `ShareName`, `Description`, `Directory_`, "
96 L"`Component_`, `User_`, `Permissions` FROM `FileShare`"; 96 L"`Component_`, `User_`, `Permissions` FROM `Wix4FileShare`";
97 97
98enum eSmbQuery { 98enum eSmbQuery {
99 ssqFileShare = 1, 99 ssqFileShare = 1,
@@ -122,26 +122,26 @@ HRESULT ScaSmbRead(SCA_SMB** ppssList)
122 SCA_SMB* pss = NULL; 122 SCA_SMB* pss = NULL;
123 BOOL bUserPermissionsTableExists = FALSE; 123 BOOL bUserPermissionsTableExists = FALSE;
124 124
125 if (S_OK != WcaTableExists(L"FileShare")) 125 if (S_OK != WcaTableExists(L"Wix4FileShare"))
126 { 126 {
127 WcaLog(LOGMSG_VERBOSE, "Skipping ScaSmbCreateShare() - FileShare table not present"); 127 WcaLog(LOGMSG_VERBOSE, "Skipping ScaSmbCreateShare() - Wix4FileShare table not present");
128 ExitFunction1(hr = S_FALSE); 128 ExitFunction1(hr = S_FALSE);
129 } 129 }
130 130
131 if (S_OK == WcaTableExists(L"FileSharePermissions")) 131 if (S_OK == WcaTableExists(L"Wix4FileSharePermissions"))
132 { 132 {
133 bUserPermissionsTableExists = TRUE; 133 bUserPermissionsTableExists = TRUE;
134 } 134 }
135 else 135 else
136 { 136 {
137 WcaLog(LOGMSG_VERBOSE, "No Additional Permissions - FileSharePermissions table not present"); 137 WcaLog(LOGMSG_VERBOSE, "No Additional Permissions - Wix4FileSharePermissions table not present");
138 } 138 }
139 139
140 WcaLog(LOGMSG_VERBOSE, "Reading File Share Tables"); 140 WcaLog(LOGMSG_VERBOSE, "Reading File Share Tables");
141 141
142 // loop through all the fileshares 142 // loop through all the fileshares
143 hr = WcaOpenExecuteView(vcsSmbQuery, &hView); 143 hr = WcaOpenExecuteView(vcsSmbQuery, &hView);
144 ExitOnFailure(hr, "Failed to open view on FileShare table"); 144 ExitOnFailure(hr, "Failed to open view on Wix4FileShare table");
145 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 145 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
146 { 146 {
147 pss = NewSmb(); 147 pss = NewSmb();
@@ -154,33 +154,33 @@ HRESULT ScaSmbRead(SCA_SMB** ppssList)
154 ::ZeroMemory(pss, sizeof(*pss)); 154 ::ZeroMemory(pss, sizeof(*pss));
155 155
156 hr = WcaGetRecordString(hRec, ssqFileShare, &pwzData); 156 hr = WcaGetRecordString(hRec, ssqFileShare, &pwzData);
157 ExitOnFailure(hr, "Failed to get FileShare.FileShare"); 157 ExitOnFailure(hr, "Failed to get Wix4FileShare.Wix4FileShare");
158 hr = ::StringCchCopyW(pss->wzId, countof(pss->wzId), pwzData); 158 hr = ::StringCchCopyW(pss->wzId, countof(pss->wzId), pwzData);
159 ExitOnFailure(hr, "Failed to copy ID string to smb object"); 159 ExitOnFailure(hr, "Failed to copy ID string to smb object");
160 160
161 hr = WcaGetRecordFormattedString(hRec, ssqShareName, &pwzData); 161 hr = WcaGetRecordFormattedString(hRec, ssqShareName, &pwzData);
162 ExitOnFailure(hr, "Failed to get FileShare.ShareName"); 162 ExitOnFailure(hr, "Failed to get Wix4FileShare.ShareName");
163 hr = ::StringCchCopyW(pss->wzShareName, countof(pss->wzShareName), pwzData); 163 hr = ::StringCchCopyW(pss->wzShareName, countof(pss->wzShareName), pwzData);
164 ExitOnFailure(hr, "Failed to copy share name string to smb object"); 164 ExitOnFailure(hr, "Failed to copy share name string to smb object");
165 165
166 hr = WcaGetRecordString(hRec, ssqComponent, &pwzData); 166 hr = WcaGetRecordString(hRec, ssqComponent, &pwzData);
167 ExitOnFailure(hr, "Failed to get Component for FileShare: '%ls'", pss->wzShareName); 167 ExitOnFailure(hr, "Failed to get Component for Wix4FileShare: '%ls'", pss->wzShareName);
168 hr = ::StringCchCopyW(pss->wzComponent, countof(pss->wzComponent), pwzData); 168 hr = ::StringCchCopyW(pss->wzComponent, countof(pss->wzComponent), pwzData);
169 ExitOnFailure(hr, "Failed to copy component string to smb object"); 169 ExitOnFailure(hr, "Failed to copy component string to smb object");
170 170
171 hr = WcaGetRecordFormattedString(hRec, ssqDescription, &pwzData); 171 hr = WcaGetRecordFormattedString(hRec, ssqDescription, &pwzData);
172 ExitOnFailure(hr, "Failed to get Share Description for FileShare: '%ls'", pss->wzShareName); 172 ExitOnFailure(hr, "Failed to get Share Description for Wix4FileShare: '%ls'", pss->wzShareName);
173 hr = ::StringCchCopyW(pss->wzDescription, countof(pss->wzDescription), pwzData); 173 hr = ::StringCchCopyW(pss->wzDescription, countof(pss->wzDescription), pwzData);
174 ExitOnFailure(hr, "Failed to copy description string to smb object"); 174 ExitOnFailure(hr, "Failed to copy description string to smb object");
175 175
176 // get user info from the user table 176 // get user info from the user table
177 hr = WcaGetRecordFormattedString(hRec, ssqUser, &pwzData); 177 hr = WcaGetRecordFormattedString(hRec, ssqUser, &pwzData);
178 ExitOnFailure(hr, "Failed to get User record for FileShare: '%ls'", pss->wzShareName); 178 ExitOnFailure(hr, "Failed to get Wix4User record for Wix4FileShare: '%ls'", pss->wzShareName);
179 179
180 // get component install state 180 // get component install state
181 er = ::MsiGetComponentStateW(WcaGetInstallHandle(), pss->wzComponent, &pss->isInstalled, &pss->isAction); 181 er = ::MsiGetComponentStateW(WcaGetInstallHandle(), pss->wzComponent, &pss->isInstalled, &pss->isAction);
182 hr = HRESULT_FROM_WIN32(er); 182 hr = HRESULT_FROM_WIN32(er);
183 ExitOnFailure(hr, "Failed to get Component state for FileShare"); 183 ExitOnFailure(hr, "Failed to get Component state for Wix4FileShare");
184 184
185 // if a user was specified 185 // if a user was specified
186 if (*pwzData) 186 if (*pwzData)
@@ -200,7 +200,7 @@ HRESULT ScaSmbRead(SCA_SMB** ppssList)
200 200
201 // get the share's directory 201 // get the share's directory
202 hr = WcaGetRecordString(hRec, ssqDirectory, &pwzData); 202 hr = WcaGetRecordString(hRec, ssqDirectory, &pwzData);
203 ExitOnFailure(hr, "Failed to get directory for FileShare: '%ls'", pss->wzShareName); 203 ExitOnFailure(hr, "Failed to get directory for Wix4FileShare: '%ls'", pss->wzShareName);
204 204
205 WCHAR wzPath[MAX_PATH]; 205 WCHAR wzPath[MAX_PATH];
206 DWORD dwLen; 206 DWORD dwLen;
@@ -236,7 +236,7 @@ HRESULT ScaSmbRead(SCA_SMB** ppssList)
236 ExitOnFailure(hr, "Failed to copy directory string to smb object"); 236 ExitOnFailure(hr, "Failed to copy directory string to smb object");
237 237
238 hr = WcaGetRecordInteger(hRec, ssqPermissions, &pss->nPermissions); 238 hr = WcaGetRecordInteger(hRec, ssqPermissions, &pss->nPermissions);
239 ExitOnFailure(hr, "Failed to get FileShare.Permissions"); 239 ExitOnFailure(hr, "Failed to get Wix4FileShare.Permissions");
240 240
241 // Check to see if additional user & permissions are specified for this share 241 // Check to see if additional user & permissions are specified for this share
242 if (bUserPermissionsTableExists) 242 if (bUserPermissionsTableExists)
@@ -253,7 +253,7 @@ HRESULT ScaSmbRead(SCA_SMB** ppssList)
253 { 253 {
254 hr = S_OK; 254 hr = S_OK;
255 } 255 }
256 ExitOnFailure(hr, "Failure occured while processing FileShare table"); 256 ExitOnFailure(hr, "Failure occured while processing Wix4FileShare table");
257 257
258LExit: 258LExit:
259 // if anything was left over after an error clean it all up 259 // if anything was left over after an error clean it all up
@@ -420,10 +420,10 @@ HRESULT SchedCreateSmb(SCA_SMB* pss)
420 } 420 }
421 421
422 // Schedule the rollback first 422 // Schedule the rollback first
423 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"CreateSmbRollback"), pwzRollbackCustomActionData, COST_SMB_DROPSMB); 423 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"CreateSmbRollback"), pwzRollbackCustomActionData, COST_SMB_DROPSMB);
424 ExitOnFailure(hr, "Failed to schedule DropSmb action"); 424 ExitOnFailure(hr, "Failed to schedule DropSmb action");
425 425
426 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"CreateSmb"), pwzCustomActionData, COST_SMB_CREATESMB); 426 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"CreateSmb"), pwzCustomActionData, COST_SMB_CREATESMB);
427 ExitOnFailure(hr, "Failed to schedule CreateSmb action"); 427 ExitOnFailure(hr, "Failed to schedule CreateSmb action");
428 428
429LExit: 429LExit:
@@ -511,14 +511,14 @@ HRESULT SchedDropSmb(SCA_SMB* pss)
511 ExitOnFailure(hr, "Failed to add permissions to CustomActionData"); 511 ExitOnFailure(hr, "Failed to add permissions to CustomActionData");
512 } 512 }
513 513
514 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"DropSmbRollback"), pwzRollbackCustomActionData, COST_SMB_CREATESMB); 514 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"DropSmbRollback"), pwzRollbackCustomActionData, COST_SMB_CREATESMB);
515 ExitOnFailure(hr, "Failed to schedule DropSmbRollback action"); 515 ExitOnFailure(hr, "Failed to schedule DropSmbRollback action");
516 516
517 // DropSMB 517 // DropSMB
518 hr = WcaWriteStringToCaData(pss->wzShareName, &pwzCustomActionData); 518 hr = WcaWriteStringToCaData(pss->wzShareName, &pwzCustomActionData);
519 ExitOnFailure(hr, "failed to add ShareName to CustomActionData"); 519 ExitOnFailure(hr, "failed to add ShareName to CustomActionData");
520 520
521 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"DropSmb"), pwzCustomActionData, COST_SMB_DROPSMB); 521 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"DropSmb"), pwzCustomActionData, COST_SMB_DROPSMB);
522 ExitOnFailure(hr, "Failed to schedule DropSmb action"); 522 ExitOnFailure(hr, "Failed to schedule DropSmb action");
523 523
524LExit: 524LExit:
@@ -558,7 +558,7 @@ LExit:
558} 558}
559 559
560LPCWSTR vcsSmbExUserPermsQuery = L"SELECT `FileShare_`,`User_`,`Permissions` " 560LPCWSTR vcsSmbExUserPermsQuery = L"SELECT `FileShare_`,`User_`,`Permissions` "
561 L"FROM `FileSharePermissions` WHERE `FileShare_`=?"; 561 L"FROM `Wix4FileSharePermissions` WHERE `FileShare_`=?";
562 562
563enum eSmbUserPermsQuery { 563enum eSmbUserPermsQuery {
564 ssupqFileShare = 1, 564 ssupqFileShare = 1,
@@ -588,9 +588,9 @@ HRESULT ScaSmbExPermsRead(SCA_SMB* pss)
588 ExitOnFailure(hr, "Failed to look up FileShare"); 588 ExitOnFailure(hr, "Failed to look up FileShare");
589 589
590 hr = WcaOpenView(vcsSmbExUserPermsQuery, &hView); 590 hr = WcaOpenView(vcsSmbExUserPermsQuery, &hView);
591 ExitOnFailure(hr, "Failed to open view on FileSharePermissions table"); 591 ExitOnFailure(hr, "Failed to open view on Wix4FileSharePermissions table");
592 hr = WcaExecuteView(hView, hRec); 592 hr = WcaExecuteView(hView, hRec);
593 ExitOnFailure(hr, "Failed to execute view on FileSharePermissions table"); 593 ExitOnFailure(hr, "Failed to execute view on Wix4FileSharePermissions table");
594 594
595 // loop through all User/Permissions paris returned 595 // loop through all User/Permissions paris returned
596 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 596 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
@@ -605,12 +605,12 @@ HRESULT ScaSmbExPermsRead(SCA_SMB* pss)
605 ::ZeroMemory(pExUserPerms, sizeof(*pExUserPerms)); 605 ::ZeroMemory(pExUserPerms, sizeof(*pExUserPerms));
606 606
607 hr = WcaGetRecordString(hRec, ssupqUser, &pwzData); 607 hr = WcaGetRecordString(hRec, ssupqUser, &pwzData);
608 ExitOnFailure(hr, "Failed to get FileSharePermissions.User"); 608 ExitOnFailure(hr, "Failed to get Wix4FileSharePermissions.User");
609 hr = ScaGetUser(pwzData, &pExUserPerms->scau); 609 hr = ScaGetUser(pwzData, &pExUserPerms->scau);
610 ExitOnFailure(hr, "Failed to get user information for fileshare: '%ls'", pss->wzShareName); 610 ExitOnFailure(hr, "Failed to get user information for fileshare: '%ls'", pss->wzShareName);
611 611
612 hr = WcaGetRecordInteger(hRec, ssupqPermissions, &pExUserPerms->nPermissions); 612 hr = WcaGetRecordInteger(hRec, ssupqPermissions, &pExUserPerms->nPermissions);
613 ExitOnFailure(hr, "Failed to get FileSharePermissions.Permissions"); 613 ExitOnFailure(hr, "Failed to get Wix4FileSharePermissions.Permissions");
614 pExUserPerms->accessMode = SET_ACCESS; // we only support SET_ACCESS here 614 pExUserPerms->accessMode = SET_ACCESS; // we only support SET_ACCESS here
615 615
616 pExUserPermsList = AddExUserPermsSmbToList(pExUserPermsList, pExUserPerms); 616 pExUserPermsList = AddExUserPermsSmbToList(pExUserPermsList, pExUserPerms);
diff --git a/src/ca/scauser.cpp b/src/ca/scauser.cpp
index 43317bdc..0d87301f 100644
--- a/src/ca/scauser.cpp
+++ b/src/ca/scauser.cpp
@@ -2,16 +2,16 @@
2 2
3#include "precomp.h" 3#include "precomp.h"
4 4
5LPCWSTR vcsUserQuery = L"SELECT `User`, `Component_`, `Name`, `Domain`, `Password` FROM `User` WHERE `User`=?"; 5LPCWSTR vcsUserQuery = L"SELECT `Wix4User`, `Component_`, `Name`, `Domain`, `Password` FROM `Wix4User` WHERE `Wix4User`=?";
6enum eUserQuery { vuqUser = 1, vuqComponent, vuqName, vuqDomain, vuqPassword }; 6enum eUserQuery { vuqUser = 1, vuqComponent, vuqName, vuqDomain, vuqPassword };
7 7
8LPCWSTR vcsGroupQuery = L"SELECT `Group`, `Component_`, `Name`, `Domain` FROM `Group` WHERE `Group`=?"; 8LPCWSTR vcsGroupQuery = L"SELECT `Wix4Group`, `Component_`, `Name`, `Domain` FROM `Wix4Group` WHERE `Wix4Group`=?";
9enum eGroupQuery { vgqGroup = 1, vgqComponent, vgqName, vgqDomain }; 9enum eGroupQuery { vgqGroup = 1, vgqComponent, vgqName, vgqDomain };
10 10
11LPCWSTR vcsUserGroupQuery = L"SELECT `User_`, `Group_` FROM `UserGroup` WHERE `User_`=?"; 11LPCWSTR vcsUserGroupQuery = L"SELECT `Wix4User_`, `Wix4Group_` FROM `Wix4UserGroup` WHERE `Wix4User_`=?";
12enum eUserGroupQuery { vugqUser = 1, vugqGroup }; 12enum eUserGroupQuery { vugqUser = 1, vugqGroup };
13 13
14LPCWSTR vActionableQuery = L"SELECT `User`,`Component_`,`Name`,`Domain`,`Password`,`Attributes` FROM `User` WHERE `Component_` IS NOT NULL"; 14LPCWSTR vActionableQuery = L"SELECT `Wix4User`,`Component_`,`Name`,`Domain`,`Password`,`Attributes` FROM `Wix4User` WHERE `Component_` IS NOT NULL";
15enum eActionableQuery { vaqUser = 1, vaqComponent, vaqName, vaqDomain, vaqPassword, vaqAttributes }; 15enum eActionableQuery { vaqUser = 1, vaqComponent, vaqName, vaqDomain, vaqPassword, vaqAttributes };
16 16
17 17
@@ -51,46 +51,46 @@ HRESULT __stdcall ScaGetUser(
51 ExitOnFailure(hr, "Failed to look up User"); 51 ExitOnFailure(hr, "Failed to look up User");
52 52
53 hr = WcaOpenView(vcsUserQuery, &hView); 53 hr = WcaOpenView(vcsUserQuery, &hView);
54 ExitOnFailure(hr, "Failed to open view on User table"); 54 ExitOnFailure(hr, "Failed to open view on Wix4User table");
55 hr = WcaExecuteView(hView, hRec); 55 hr = WcaExecuteView(hView, hRec);
56 ExitOnFailure(hr, "Failed to execute view on User table"); 56 ExitOnFailure(hr, "Failed to execute view on Wix4User table");
57 57
58 hr = WcaFetchSingleRecord(hView, &hRec); 58 hr = WcaFetchSingleRecord(hView, &hRec);
59 if (S_OK == hr) 59 if (S_OK == hr)
60 { 60 {
61 hr = WcaGetRecordString(hRec, vuqUser, &pwzData); 61 hr = WcaGetRecordString(hRec, vuqUser, &pwzData);
62 ExitOnFailure(hr, "Failed to get User.User"); 62 ExitOnFailure(hr, "Failed to get Wix4User.User");
63 hr = ::StringCchCopyW(pscau->wzKey, countof(pscau->wzKey), pwzData); 63 hr = ::StringCchCopyW(pscau->wzKey, countof(pscau->wzKey), pwzData);
64 ExitOnFailure(hr, "Failed to copy key string to user object"); 64 ExitOnFailure(hr, "Failed to copy key string to user object");
65 65
66 hr = WcaGetRecordString(hRec, vuqComponent, &pwzData); 66 hr = WcaGetRecordString(hRec, vuqComponent, &pwzData);
67 ExitOnFailure(hr, "Failed to get User.Component_"); 67 ExitOnFailure(hr, "Failed to get Wix4User.Component_");
68 hr = ::StringCchCopyW(pscau->wzComponent, countof(pscau->wzComponent), pwzData); 68 hr = ::StringCchCopyW(pscau->wzComponent, countof(pscau->wzComponent), pwzData);
69 ExitOnFailure(hr, "Failed to copy component string to user object"); 69 ExitOnFailure(hr, "Failed to copy component string to user object");
70 70
71 hr = WcaGetRecordFormattedString(hRec, vuqName, &pwzData); 71 hr = WcaGetRecordFormattedString(hRec, vuqName, &pwzData);
72 ExitOnFailure(hr, "Failed to get User.Name"); 72 ExitOnFailure(hr, "Failed to get Wix4User.Name");
73 hr = ::StringCchCopyW(pscau->wzName, countof(pscau->wzName), pwzData); 73 hr = ::StringCchCopyW(pscau->wzName, countof(pscau->wzName), pwzData);
74 ExitOnFailure(hr, "Failed to copy name string to user object"); 74 ExitOnFailure(hr, "Failed to copy name string to user object");
75 75
76 hr = WcaGetRecordFormattedString(hRec, vuqDomain, &pwzData); 76 hr = WcaGetRecordFormattedString(hRec, vuqDomain, &pwzData);
77 ExitOnFailure(hr, "Failed to get User.Domain"); 77 ExitOnFailure(hr, "Failed to get Wix4User.Domain");
78 hr = ::StringCchCopyW(pscau->wzDomain, countof(pscau->wzDomain), pwzData); 78 hr = ::StringCchCopyW(pscau->wzDomain, countof(pscau->wzDomain), pwzData);
79 ExitOnFailure(hr, "Failed to copy domain string to user object"); 79 ExitOnFailure(hr, "Failed to copy domain string to user object");
80 80
81 hr = WcaGetRecordFormattedString(hRec, vuqPassword, &pwzData); 81 hr = WcaGetRecordFormattedString(hRec, vuqPassword, &pwzData);
82 ExitOnFailure(hr, "Failed to get User.Password"); 82 ExitOnFailure(hr, "Failed to get Wix4User.Password");
83 hr = ::StringCchCopyW(pscau->wzPassword, countof(pscau->wzPassword), pwzData); 83 hr = ::StringCchCopyW(pscau->wzPassword, countof(pscau->wzPassword), pwzData);
84 ExitOnFailure(hr, "Failed to copy password string to user object"); 84 ExitOnFailure(hr, "Failed to copy password string to user object");
85 } 85 }
86 else if (E_NOMOREITEMS == hr) 86 else if (E_NOMOREITEMS == hr)
87 { 87 {
88 WcaLog(LOGMSG_STANDARD, "Error: Cannot locate User.User='%ls'", wzUser); 88 WcaLog(LOGMSG_STANDARD, "Error: Cannot locate Wix4User.User='%ls'", wzUser);
89 hr = E_FAIL; 89 hr = E_FAIL;
90 } 90 }
91 else 91 else
92 { 92 {
93 ExitOnFailure(hr, "Error or found multiple matching User rows"); 93 ExitOnFailure(hr, "Error or found multiple matching Wix4User rows");
94 } 94 }
95 95
96LExit: 96LExit:
@@ -131,42 +131,42 @@ HRESULT __stdcall ScaGetUserDeferred(
131 hr = WcaFetchWrappedRecordWhereString(hUserQuery, vuqUser, wzUser, &hRecTest); 131 hr = WcaFetchWrappedRecordWhereString(hUserQuery, vuqUser, wzUser, &hRecTest);
132 if (S_OK == hr) 132 if (S_OK == hr)
133 { 133 {
134 AssertSz(FALSE, "Found multiple matching User rows"); 134 AssertSz(FALSE, "Found multiple matching Wix4User rows");
135 } 135 }
136 136
137 hr = WcaGetRecordString(hRec, vuqUser, &pwzData); 137 hr = WcaGetRecordString(hRec, vuqUser, &pwzData);
138 ExitOnFailure(hr, "Failed to get User.User"); 138 ExitOnFailure(hr, "Failed to get Wix4User.User");
139 hr = ::StringCchCopyW(pscau->wzKey, countof(pscau->wzKey), pwzData); 139 hr = ::StringCchCopyW(pscau->wzKey, countof(pscau->wzKey), pwzData);
140 ExitOnFailure(hr, "Failed to copy key string to user object (in deferred CA)"); 140 ExitOnFailure(hr, "Failed to copy key string to user object (in deferred CA)");
141 141
142 hr = WcaGetRecordString(hRec, vuqComponent, &pwzData); 142 hr = WcaGetRecordString(hRec, vuqComponent, &pwzData);
143 ExitOnFailure(hr, "Failed to get User.Component_"); 143 ExitOnFailure(hr, "Failed to get Wix4User.Component_");
144 hr = ::StringCchCopyW(pscau->wzComponent, countof(pscau->wzComponent), pwzData); 144 hr = ::StringCchCopyW(pscau->wzComponent, countof(pscau->wzComponent), pwzData);
145 ExitOnFailure(hr, "Failed to copy component string to user object (in deferred CA)"); 145 ExitOnFailure(hr, "Failed to copy component string to user object (in deferred CA)");
146 146
147 hr = WcaGetRecordString(hRec, vuqName, &pwzData); 147 hr = WcaGetRecordString(hRec, vuqName, &pwzData);
148 ExitOnFailure(hr, "Failed to get User.Name"); 148 ExitOnFailure(hr, "Failed to get Wix4User.Name");
149 hr = ::StringCchCopyW(pscau->wzName, countof(pscau->wzName), pwzData); 149 hr = ::StringCchCopyW(pscau->wzName, countof(pscau->wzName), pwzData);
150 ExitOnFailure(hr, "Failed to copy name string to user object (in deferred CA)"); 150 ExitOnFailure(hr, "Failed to copy name string to user object (in deferred CA)");
151 151
152 hr = WcaGetRecordString(hRec, vuqDomain, &pwzData); 152 hr = WcaGetRecordString(hRec, vuqDomain, &pwzData);
153 ExitOnFailure(hr, "Failed to get User.Domain"); 153 ExitOnFailure(hr, "Failed to get Wix4User.Domain");
154 hr = ::StringCchCopyW(pscau->wzDomain, countof(pscau->wzDomain), pwzData); 154 hr = ::StringCchCopyW(pscau->wzDomain, countof(pscau->wzDomain), pwzData);
155 ExitOnFailure(hr, "Failed to copy domain string to user object (in deferred CA)"); 155 ExitOnFailure(hr, "Failed to copy domain string to user object (in deferred CA)");
156 156
157 hr = WcaGetRecordString(hRec, vuqPassword, &pwzData); 157 hr = WcaGetRecordString(hRec, vuqPassword, &pwzData);
158 ExitOnFailure(hr, "Failed to get User.Password"); 158 ExitOnFailure(hr, "Failed to get Wix4User.Password");
159 hr = ::StringCchCopyW(pscau->wzPassword, countof(pscau->wzPassword), pwzData); 159 hr = ::StringCchCopyW(pscau->wzPassword, countof(pscau->wzPassword), pwzData);
160 ExitOnFailure(hr, "Failed to copy password string to user object (in deferred CA)"); 160 ExitOnFailure(hr, "Failed to copy password string to user object (in deferred CA)");
161 } 161 }
162 else if (E_NOMOREITEMS == hr) 162 else if (E_NOMOREITEMS == hr)
163 { 163 {
164 WcaLog(LOGMSG_STANDARD, "Error: Cannot locate User.User='%ls'", wzUser); 164 WcaLog(LOGMSG_STANDARD, "Error: Cannot locate Wix4User.User='%ls'", wzUser);
165 hr = E_FAIL; 165 hr = E_FAIL;
166 } 166 }
167 else 167 else
168 { 168 {
169 ExitOnFailure(hr, "Error fetching single User row"); 169 ExitOnFailure(hr, "Error fetching single Wix4User row");
170 } 170 }
171 171
172LExit: 172LExit:
@@ -196,41 +196,41 @@ HRESULT __stdcall ScaGetGroup(
196 ExitOnFailure(hr, "Failed to look up Group"); 196 ExitOnFailure(hr, "Failed to look up Group");
197 197
198 hr = WcaOpenView(vcsGroupQuery, &hView); 198 hr = WcaOpenView(vcsGroupQuery, &hView);
199 ExitOnFailure(hr, "Failed to open view on Group table"); 199 ExitOnFailure(hr, "Failed to open view on Wix4Group table");
200 hr = WcaExecuteView(hView, hRec); 200 hr = WcaExecuteView(hView, hRec);
201 ExitOnFailure(hr, "Failed to execute view on Group table"); 201 ExitOnFailure(hr, "Failed to execute view on Wix4Group table");
202 202
203 hr = WcaFetchSingleRecord(hView, &hRec); 203 hr = WcaFetchSingleRecord(hView, &hRec);
204 if (S_OK == hr) 204 if (S_OK == hr)
205 { 205 {
206 hr = WcaGetRecordString(hRec, vgqGroup, &pwzData); 206 hr = WcaGetRecordString(hRec, vgqGroup, &pwzData);
207 ExitOnFailure(hr, "Failed to get Group.Group"); 207 ExitOnFailure(hr, "Failed to get Wix4Group.Wix4Group.");
208 hr = ::StringCchCopyW(pscag->wzKey, countof(pscag->wzKey), pwzData); 208 hr = ::StringCchCopyW(pscag->wzKey, countof(pscag->wzKey), pwzData);
209 ExitOnFailure(hr, "Failed to copy Group.Group."); 209 ExitOnFailure(hr, "Failed to copy Wix4Group.Wix4Group.");
210 210
211 hr = WcaGetRecordString(hRec, vgqComponent, &pwzData); 211 hr = WcaGetRecordString(hRec, vgqComponent, &pwzData);
212 ExitOnFailure(hr, "Failed to get Group.Component_"); 212 ExitOnFailure(hr, "Failed to get Wix4Group.Component_");
213 hr = ::StringCchCopyW(pscag->wzComponent, countof(pscag->wzComponent), pwzData); 213 hr = ::StringCchCopyW(pscag->wzComponent, countof(pscag->wzComponent), pwzData);
214 ExitOnFailure(hr, "Failed to copy Group.Component_."); 214 ExitOnFailure(hr, "Failed to copy Wix4Group.Component_.");
215 215
216 hr = WcaGetRecordFormattedString(hRec, vgqName, &pwzData); 216 hr = WcaGetRecordFormattedString(hRec, vgqName, &pwzData);
217 ExitOnFailure(hr, "Failed to get Group.Name"); 217 ExitOnFailure(hr, "Failed to get Wix4Group.Name");
218 hr = ::StringCchCopyW(pscag->wzName, countof(pscag->wzName), pwzData); 218 hr = ::StringCchCopyW(pscag->wzName, countof(pscag->wzName), pwzData);
219 ExitOnFailure(hr, "Failed to copy Group.Name."); 219 ExitOnFailure(hr, "Failed to copy Wix4Group.Name.");
220 220
221 hr = WcaGetRecordFormattedString(hRec, vgqDomain, &pwzData); 221 hr = WcaGetRecordFormattedString(hRec, vgqDomain, &pwzData);
222 ExitOnFailure(hr, "Failed to get Group.Domain"); 222 ExitOnFailure(hr, "Failed to get Wix4Group.Domain");
223 hr = ::StringCchCopyW(pscag->wzDomain, countof(pscag->wzDomain), pwzData); 223 hr = ::StringCchCopyW(pscag->wzDomain, countof(pscag->wzDomain), pwzData);
224 ExitOnFailure(hr, "Failed to copy Group.Domain."); 224 ExitOnFailure(hr, "Failed to copy Wix4Group.Domain.");
225 } 225 }
226 else if (E_NOMOREITEMS == hr) 226 else if (E_NOMOREITEMS == hr)
227 { 227 {
228 WcaLog(LOGMSG_STANDARD, "Error: Cannot locate Group.Group='%ls'", wzGroup); 228 WcaLog(LOGMSG_STANDARD, "Error: Cannot locate Wix4Group.Wix4Group='%ls'", wzGroup);
229 hr = E_FAIL; 229 hr = E_FAIL;
230 } 230 }
231 else 231 else
232 { 232 {
233 ExitOnFailure(hr, "Error or found multiple matching Group rows"); 233 ExitOnFailure(hr, "Error or found multiple matching Wix4Group rows");
234 } 234 }
235 235
236LExit: 236LExit:
@@ -284,19 +284,19 @@ HRESULT ScaUserRead(
284 284
285 LPWSTR pwzData = NULL; 285 LPWSTR pwzData = NULL;
286 286
287 BOOL fUserGroupExists = FALSE; 287 BOOL fUserGroupExists = FALSE;
288 288
289 SCA_USER *psu = NULL; 289 SCA_USER *psu = NULL;
290 290
291 INSTALLSTATE isInstalled, isAction; 291 INSTALLSTATE isInstalled, isAction;
292 292
293 if (S_OK != WcaTableExists(L"User")) 293 if (S_OK != WcaTableExists(L"Wix4User"))
294 { 294 {
295 WcaLog(LOGMSG_VERBOSE, "User Table does not exist, exiting"); 295 WcaLog(LOGMSG_VERBOSE, "Wix4User Table does not exist, exiting");
296 ExitFunction1(hr = S_FALSE); 296 ExitFunction1(hr = S_FALSE);
297 } 297 }
298 298
299 if (S_OK == WcaTableExists(L"UserGroup")) 299 if (S_OK == WcaTableExists(L"Wix4UserGroup"))
300 { 300 {
301 fUserGroupExists = TRUE; 301 fUserGroupExists = TRUE;
302 } 302 }
@@ -305,15 +305,15 @@ HRESULT ScaUserRead(
305 // loop through all the users 305 // loop through all the users
306 // 306 //
307 hr = WcaOpenExecuteView(vActionableQuery, &hView); 307 hr = WcaOpenExecuteView(vActionableQuery, &hView);
308 ExitOnFailure(hr, "failed to open view on User table"); 308 ExitOnFailure(hr, "failed to open view on Wix4User table");
309 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 309 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
310 { 310 {
311 hr = WcaGetRecordString(hRec, vaqComponent, &pwzData); 311 hr = WcaGetRecordString(hRec, vaqComponent, &pwzData);
312 ExitOnFailure(hr, "failed to get User.Component"); 312 ExitOnFailure(hr, "failed to get Wix4User.Component");
313 313
314 er = ::MsiGetComponentStateW(WcaGetInstallHandle(), pwzData, &isInstalled, &isAction); 314 er = ::MsiGetComponentStateW(WcaGetInstallHandle(), pwzData, &isInstalled, &isAction);
315 hr = HRESULT_FROM_WIN32(er); 315 hr = HRESULT_FROM_WIN32(er);
316 ExitOnFailure(hr, "failed to get Component state for User"); 316 ExitOnFailure(hr, "failed to get Component state for Wix4User");
317 317
318 // don't bother if we aren't installing or uninstalling this component 318 // don't bother if we aren't installing or uninstalling this component
319 if (WcaIsInstalling(isInstalled, isAction) || WcaIsUninstalling(isInstalled, isAction)) 319 if (WcaIsInstalling(isInstalled, isAction) || WcaIsUninstalling(isInstalled, isAction))
@@ -332,44 +332,44 @@ HRESULT ScaUserRead(
332 ExitOnFailure(hr, "failed to copy component name: %ls", pwzData); 332 ExitOnFailure(hr, "failed to copy component name: %ls", pwzData);
333 333
334 hr = WcaGetRecordString(hRec, vaqUser, &pwzData); 334 hr = WcaGetRecordString(hRec, vaqUser, &pwzData);
335 ExitOnFailure(hr, "failed to get User.User"); 335 ExitOnFailure(hr, "failed to get Wix4User.User");
336 hr = ::StringCchCopyW(psu->wzKey, countof(psu->wzKey), pwzData); 336 hr = ::StringCchCopyW(psu->wzKey, countof(psu->wzKey), pwzData);
337 ExitOnFailure(hr, "failed to copy user key: %ls", pwzData); 337 ExitOnFailure(hr, "failed to copy user key: %ls", pwzData);
338 338
339 hr = WcaGetRecordFormattedString(hRec, vaqName, &pwzData); 339 hr = WcaGetRecordFormattedString(hRec, vaqName, &pwzData);
340 ExitOnFailure(hr, "failed to get User.Name"); 340 ExitOnFailure(hr, "failed to get Wix4User.Name");
341 hr = ::StringCchCopyW(psu->wzName, countof(psu->wzName), pwzData); 341 hr = ::StringCchCopyW(psu->wzName, countof(psu->wzName), pwzData);
342 ExitOnFailure(hr, "failed to copy user name: %ls", pwzData); 342 ExitOnFailure(hr, "failed to copy user name: %ls", pwzData);
343 343
344 hr = WcaGetRecordFormattedString(hRec, vaqDomain, &pwzData); 344 hr = WcaGetRecordFormattedString(hRec, vaqDomain, &pwzData);
345 ExitOnFailure(hr, "failed to get User.Domain"); 345 ExitOnFailure(hr, "failed to get Wix4User.Domain");
346 hr = ::StringCchCopyW(psu->wzDomain, countof(psu->wzDomain), pwzData); 346 hr = ::StringCchCopyW(psu->wzDomain, countof(psu->wzDomain), pwzData);
347 ExitOnFailure(hr, "failed to copy user domain: %ls", pwzData); 347 ExitOnFailure(hr, "failed to copy user domain: %ls", pwzData);
348 348
349 hr = WcaGetRecordFormattedString(hRec, vaqPassword, &pwzData); 349 hr = WcaGetRecordFormattedString(hRec, vaqPassword, &pwzData);
350 ExitOnFailure(hr, "failed to get User.Password"); 350 ExitOnFailure(hr, "failed to get Wix4User.Password");
351 hr = ::StringCchCopyW(psu->wzPassword, countof(psu->wzPassword), pwzData); 351 hr = ::StringCchCopyW(psu->wzPassword, countof(psu->wzPassword), pwzData);
352 ExitOnFailure(hr, "failed to copy user password"); 352 ExitOnFailure(hr, "failed to copy user password");
353 353
354 hr = WcaGetRecordInteger(hRec, vaqAttributes, &psu->iAttributes); 354 hr = WcaGetRecordInteger(hRec, vaqAttributes, &psu->iAttributes);
355 ExitOnFailure(hr, "failed to get User.Attributes"); 355 ExitOnFailure(hr, "failed to get Wix4User.Attributes");
356 356
357 // Check if this user is to be added to any groups 357 // Check if this user is to be added to any groups
358 if (fUserGroupExists) 358 if (fUserGroupExists)
359 { 359 {
360 hUserRec = ::MsiCreateRecord(1); 360 hUserRec = ::MsiCreateRecord(1);
361 hr = WcaSetRecordString(hUserRec, 1, psu->wzKey); 361 hr = WcaSetRecordString(hUserRec, 1, psu->wzKey);
362 ExitOnFailure(hr, "Failed to create user record for querying UserGroup table"); 362 ExitOnFailure(hr, "Failed to create user record for querying Wix4UserGroup table");
363 363
364 hr = WcaOpenView(vcsUserGroupQuery, &hUserGroupView); 364 hr = WcaOpenView(vcsUserGroupQuery, &hUserGroupView);
365 ExitOnFailure(hr, "Failed to open view on UserGroup table for user %ls", psu->wzKey); 365 ExitOnFailure(hr, "Failed to open view on Wix4UserGroup table for user %ls", psu->wzKey);
366 hr = WcaExecuteView(hUserGroupView, hUserRec); 366 hr = WcaExecuteView(hUserGroupView, hUserRec);
367 ExitOnFailure(hr, "Failed to execute view on UserGroup table for user: %ls", psu->wzKey); 367 ExitOnFailure(hr, "Failed to execute view on Wix4UserGroup table for user: %ls", psu->wzKey);
368 368
369 while (S_OK == (hr = WcaFetchRecord(hUserGroupView, &hRec))) 369 while (S_OK == (hr = WcaFetchRecord(hUserGroupView, &hRec)))
370 { 370 {
371 hr = WcaGetRecordString(hRec, vugqGroup, &pwzData); 371 hr = WcaGetRecordString(hRec, vugqGroup, &pwzData);
372 ExitOnFailure(hr, "failed to get UserGroup.Group"); 372 ExitOnFailure(hr, "failed to get Wix4UserGroup.Group");
373 373
374 hr = AddGroupToList(&(psu->psgGroups)); 374 hr = AddGroupToList(&(psu->psgGroups));
375 ExitOnFailure(hr, "failed to add group to list"); 375 ExitOnFailure(hr, "failed to add group to list");
@@ -382,7 +382,7 @@ HRESULT ScaUserRead(
382 { 382 {
383 hr = S_OK; 383 hr = S_OK;
384 } 384 }
385 ExitOnFailure(hr, "failed to enumerate selected rows from UserGroup table"); 385 ExitOnFailure(hr, "failed to enumerate selected rows from Wix4UserGroup table");
386 } 386 }
387 } 387 }
388 } 388 }
@@ -391,7 +391,7 @@ HRESULT ScaUserRead(
391 { 391 {
392 hr = S_OK; 392 hr = S_OK;
393 } 393 }
394 ExitOnFailure(hr, "failed to enumerate selected rows from User table"); 394 ExitOnFailure(hr, "failed to enumerate selected rows from Wix4User table");
395 395
396LExit: 396LExit:
397 ReleaseStr(pwzData); 397 ReleaseStr(pwzData);
@@ -581,7 +581,7 @@ HRESULT ScaUserExecute(
581 ExitOnFailure(hr, "failed to add group information to rollback custom action data"); 581 ExitOnFailure(hr, "failed to add group information to rollback custom action data");
582 } 582 }
583 583
584 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"CreateUserRollback"), pwzRollbackData, COST_USER_DELETE); 584 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"CreateUserRollback"), pwzRollbackData, COST_USER_DELETE);
585 ExitOnFailure(hr, "failed to schedule CreateUserRollback"); 585 ExitOnFailure(hr, "failed to schedule CreateUserRollback");
586 } 586 }
587 587
@@ -595,7 +595,7 @@ HRESULT ScaUserExecute(
595 hr = WriteGroupInfo(psu->psgGroups, &pwzActionData); 595 hr = WriteGroupInfo(psu->psgGroups, &pwzActionData);
596 ExitOnFailure(hr, "failed to add group information to custom action data"); 596 ExitOnFailure(hr, "failed to add group information to custom action data");
597 597
598 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"CreateUser"), pwzActionData, COST_USER_ADD); 598 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"CreateUser"), pwzActionData, COST_USER_ADD);
599 ExitOnFailure(hr, "failed to schedule CreateUser"); 599 ExitOnFailure(hr, "failed to schedule CreateUser");
600 } 600 }
601 else if (((USER_EXISTS_YES == ueUserExists) || (USER_EXISTS_INDETERMINATE == ueUserExists)) && WcaIsUninstalling(psu->isInstalled, psu->isAction) && !(psu->iAttributes & SCAU_DONT_REMOVE_ON_UNINSTALL)) 601 else if (((USER_EXISTS_YES == ueUserExists) || (USER_EXISTS_INDETERMINATE == ueUserExists)) && WcaIsUninstalling(psu->isInstalled, psu->isAction) && !(psu->iAttributes & SCAU_DONT_REMOVE_ON_UNINSTALL))
@@ -610,7 +610,7 @@ HRESULT ScaUserExecute(
610 // 610 //
611 // Note: We can't rollback the removal of a user which is why RemoveUser is a commit 611 // Note: We can't rollback the removal of a user which is why RemoveUser is a commit
612 // CustomAction. 612 // CustomAction.
613 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"RemoveUser"), pwzActionData, COST_USER_DELETE); 613 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RemoveUser"), pwzActionData, COST_USER_DELETE);
614 ExitOnFailure(hr, "failed to schedule RemoveUser"); 614 ExitOnFailure(hr, "failed to schedule RemoveUser");
615 } 615 }
616 616
diff --git a/src/ca/secureobj.cpp b/src/ca/secureobj.cpp
index f6d1406a..392945d9 100644
--- a/src/ca/secureobj.cpp
+++ b/src/ca/secureobj.cpp
@@ -3,9 +3,9 @@
3#include "precomp.h" 3#include "precomp.h"
4 4
5// structs 5// structs
6LPCWSTR wzQUERY_SECUREOBJECTS = L"SELECT `SecureObjects`.`SecureObject`, `SecureObjects`.`Table`, `SecureObjects`.`Domain`, `SecureObjects`.`User`, " 6LPCWSTR wzQUERY_SECUREOBJECTS = L"SELECT `Wix4SecureObject`.`Wix4SecureObject`, `Wix4SecureObject`.`Table`, `Wix4SecureObject`.`Domain`, `Wix4SecureObject`.`User`, "
7 L"`SecureObjects`.`Permission`, `SecureObjects`.`Component_`, `Component`.`Attributes` FROM `SecureObjects`,`Component` WHERE " 7 L"`Wix4SecureObject`.`Permission`, `Wix4SecureObject`.`Component_`, `Component`.`Attributes` FROM `Wix4SecureObject`,`Component` WHERE "
8 L"`SecureObjects`.`Component_`=`Component`.`Component`"; 8 L"`Wix4SecureObject`.`Component_`=`Component`.`Component`";
9enum eQUERY_SECUREOBJECTS { QSO_SECUREOBJECT = 1, QSO_TABLE, QSO_DOMAIN, QSO_USER, QSO_PERMISSION, QSO_COMPONENT, QSO_COMPATTRIBUTES }; 9enum eQUERY_SECUREOBJECTS { QSO_SECUREOBJECT = 1, QSO_TABLE, QSO_DOMAIN, QSO_USER, QSO_PERMISSION, QSO_COMPONENT, QSO_COMPATTRIBUTES };
10 10
11LPCWSTR wzQUERY_REGISTRY = L"SELECT `Registry`.`Registry`, `Registry`.`Root`, `Registry`.`Key` FROM `Registry` WHERE `Registry`.`Registry`=?"; 11LPCWSTR wzQUERY_REGISTRY = L"SELECT `Registry`.`Registry`, `Registry`.`Root`, `Registry`.`Key` FROM `Registry` WHERE `Registry`.`Registry`=?";
@@ -142,7 +142,7 @@ static HRESULT StoreACLRollbackInfo(
142 ExitOnFailure(hr, "failed to add data to rollback CustomActionData"); 142 ExitOnFailure(hr, "failed to add data to rollback CustomActionData");
143 } 143 }
144 144
145 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"ExecSecureObjectsRollback"), pwzCustomActionData, COST_SECUREOBJECT); 145 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecSecureObjectsRollback"), pwzCustomActionData, COST_SECUREOBJECT);
146 ExitOnFailure(hr, "failed to schedule ExecSecureObjectsRollback for item: %ls of type: %ls", pwzObject, pwzTable); 146 ExitOnFailure(hr, "failed to schedule ExecSecureObjectsRollback for item: %ls of type: %ls", pwzObject, pwzTable);
147 147
148 ReleaseStr(pwzCustomActionData); 148 ReleaseStr(pwzCustomActionData);
@@ -343,9 +343,9 @@ extern "C" UINT __stdcall SchedSecureObjects(
343 ExitOnFailure(hr, "failed to initialize"); 343 ExitOnFailure(hr, "failed to initialize");
344 344
345 // anything to do? 345 // anything to do?
346 if (S_OK != WcaTableExists(L"SecureObjects")) 346 if (S_OK != WcaTableExists(L"Wix4SecureObject"))
347 { 347 {
348 WcaLog(LOGMSG_STANDARD, "SecureObjects table doesn't exist, so there are no objects to secure."); 348 WcaLog(LOGMSG_STANDARD, "Wix4SecureObject table doesn't exist, so there are no objects to secure.");
349 ExitFunction(); 349 ExitFunction();
350 } 350 }
351 351
@@ -353,7 +353,7 @@ extern "C" UINT __stdcall SchedSecureObjects(
353 // loop through all the objects to be secured 353 // loop through all the objects to be secured
354 // 354 //
355 hr = WcaOpenExecuteView(wzQUERY_SECUREOBJECTS, &hView); 355 hr = WcaOpenExecuteView(wzQUERY_SECUREOBJECTS, &hView);
356 ExitOnFailure(hr, "failed to open view on SecureObjects table"); 356 ExitOnFailure(hr, "failed to open view on Wix4SecureObject table");
357 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 357 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
358 { 358 {
359 hr = WcaGetRecordString(hRec, QSO_TABLE, &pwzTable); 359 hr = WcaGetRecordString(hRec, QSO_TABLE, &pwzTable);
@@ -372,7 +372,7 @@ extern "C" UINT __stdcall SchedSecureObjects(
372 372
373 BOOL fIs64Bit = iCompAttributes & msidbComponentAttributes64bit; 373 BOOL fIs64Bit = iCompAttributes & msidbComponentAttributes64bit;
374 374
375 // Only process entries in the SecureObjects table whose components match the bitness of this CA 375 // Only process entries in the Wix4SecureObject table whose components match the bitness of this CA
376#ifdef _WIN64 376#ifdef _WIN64
377 if (!fIs64Bit) 377 if (!fIs64Bit)
378 { 378 {
@@ -444,7 +444,7 @@ extern "C" UINT __stdcall SchedSecureObjects(
444 { 444 {
445 Assert(0 < cObjects); 445 Assert(0 < cObjects);
446 446
447 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"ExecSecureObjects"), pwzCustomActionData, cObjects * COST_SECUREOBJECT); 447 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecSecureObjects"), pwzCustomActionData, cObjects * COST_SECUREOBJECT);
448 ExitOnFailure(hr, "failed to schedule ExecSecureObjects action"); 448 ExitOnFailure(hr, "failed to schedule ExecSecureObjects action");
449 } 449 }
450 450
@@ -497,7 +497,7 @@ extern "C" UINT __stdcall SchedSecureObjectsRollback(
497 // loop through all the objects to be secured 497 // loop through all the objects to be secured
498 // 498 //
499 hr = WcaOpenExecuteView(wzQUERY_SECUREOBJECTS, &hView); 499 hr = WcaOpenExecuteView(wzQUERY_SECUREOBJECTS, &hView);
500 ExitOnFailure(hr, "failed to open view on SecureObjects table"); 500 ExitOnFailure(hr, "failed to open view on Wix4SecureObject table");
501 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 501 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
502 { 502 {
503 hr = WcaGetRecordString(hRec, QSO_TABLE, &pwzTable); 503 hr = WcaGetRecordString(hRec, QSO_TABLE, &pwzTable);
@@ -516,7 +516,7 @@ extern "C" UINT __stdcall SchedSecureObjectsRollback(
516 516
517 BOOL fIs64Bit = iCompAttributes & msidbComponentAttributes64bit; 517 BOOL fIs64Bit = iCompAttributes & msidbComponentAttributes64bit;
518 518
519 // Only process entries in the SecureObjects table whose components match the bitness of this CA 519 // Only process entries in the Wix4SecureObject table whose components match the bitness of this CA
520#ifdef _WIN64 520#ifdef _WIN64
521 if (!fIs64Bit) 521 if (!fIs64Bit)
522 { 522 {
diff --git a/src/ca/serviceconfig.cpp b/src/ca/serviceconfig.cpp
index c2b77035..04b25ffa 100644
--- a/src/ca/serviceconfig.cpp
+++ b/src/ca/serviceconfig.cpp
@@ -3,7 +3,7 @@
3#include "precomp.h" 3#include "precomp.h"
4 4
5// structs 5// structs
6LPCWSTR wzQUERY_SERVICECONFIG = L"SELECT `ServiceName`, `Component_`, `NewService`, `FirstFailureActionType`, `SecondFailureActionType`, `ThirdFailureActionType`, `ResetPeriodInDays`, `RestartServiceDelayInSeconds`, `ProgramCommandLine`, `RebootMessage` FROM `ServiceConfig`"; 6LPCWSTR wzQUERY_SERVICECONFIG = L"SELECT `ServiceName`, `Component_`, `NewService`, `FirstFailureActionType`, `SecondFailureActionType`, `ThirdFailureActionType`, `ResetPeriodInDays`, `RestartServiceDelayInSeconds`, `ProgramCommandLine`, `RebootMessage` FROM `Wix4ServiceConfig`";
7enum eQUERY_SERVICECONFIG { QSC_SERVICENAME = 1, QSC_COMPONENT, QSC_NEWSERVICE, QSC_FIRSTFAILUREACTIONTYPE, QSC_SECONDFAILUREACTIONTYPE, QSC_THIRDFAILUREACTIONTYPE, QSC_RESETPERIODINDAYS, QSC_RESTARTSERVICEDELAYINSECONDS, QSC_PROGRAMCOMMANDLINE, QSC_REBOOTMESSAGE }; 7enum eQUERY_SERVICECONFIG { QSC_SERVICENAME = 1, QSC_COMPONENT, QSC_NEWSERVICE, QSC_FIRSTFAILUREACTIONTYPE, QSC_SECONDFAILUREACTIONTYPE, QSC_THIRDFAILUREACTIONTYPE, QSC_RESETPERIODINDAYS, QSC_RESTARTSERVICEDELAYINSECONDS, QSC_PROGRAMCOMMANDLINE, QSC_REBOOTMESSAGE };
8 8
9// consts 9// consts
@@ -81,7 +81,7 @@ extern "C" UINT __stdcall SchedServiceConfig(
81 81
82 // Loop through all the services to be configured. 82 // Loop through all the services to be configured.
83 hr = WcaOpenExecuteView(wzQUERY_SERVICECONFIG, &hView); 83 hr = WcaOpenExecuteView(wzQUERY_SERVICECONFIG, &hView);
84 ExitOnFailure(hr, "Failed to open view on ServiceConfig table."); 84 ExitOnFailure(hr, "Failed to open view on Wix4ServiceConfig table.");
85 85
86 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 86 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
87 { 87 {
@@ -106,7 +106,7 @@ extern "C" UINT __stdcall SchedServiceConfig(
106 ExitOnFailure(hr, "Failed to add name to CustomActionData."); 106 ExitOnFailure(hr, "Failed to add name to CustomActionData.");
107 107
108 hr = WcaGetRecordInteger(hRec, QSC_NEWSERVICE, &iData); 108 hr = WcaGetRecordInteger(hRec, QSC_NEWSERVICE, &iData);
109 ExitOnFailure(hr, "Failed to get ServiceConfig.NewService."); 109 ExitOnFailure(hr, "Failed to get Wix4ServiceConfig.NewService.");
110 hr = WcaWriteIntegerToCaData(0 != iData, &pwzCustomActionData); 110 hr = WcaWriteIntegerToCaData(0 != iData, &pwzCustomActionData);
111 ExitOnFailure(hr, "Failed to add NewService data to CustomActionData"); 111 ExitOnFailure(hr, "Failed to add NewService data to CustomActionData");
112 112
@@ -167,10 +167,10 @@ extern "C" UINT __stdcall SchedServiceConfig(
167 // setup CustomActionData and add to progress bar for download 167 // setup CustomActionData and add to progress bar for download
168 if (0 < cServices) 168 if (0 < cServices)
169 { 169 {
170 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"RollbackServiceConfig"), pwzScriptKey, cServices * COST_SERVICECONFIG); 170 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackServiceConfig"), pwzScriptKey, cServices * COST_SERVICECONFIG);
171 ExitOnFailure(hr, "failed to schedule RollbackServiceConfig action"); 171 ExitOnFailure(hr, "failed to schedule RollbackServiceConfig action");
172 172
173 hr = WcaDoDeferredAction(PLATFORM_DECORATION(L"ExecServiceConfig"), pwzCustomActionData, cServices * COST_SERVICECONFIG); 173 hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"ExecServiceConfig"), pwzCustomActionData, cServices * COST_SERVICECONFIG);
174 ExitOnFailure(hr, "failed to schedule ExecServiceConfig action"); 174 ExitOnFailure(hr, "failed to schedule ExecServiceConfig action");
175 } 175 }
176 176
diff --git a/src/ca/utilca.vcxproj b/src/ca/utilca.vcxproj
index 2ec0c706..45a7f278 100644
--- a/src/ca/utilca.vcxproj
+++ b/src/ca/utilca.vcxproj
@@ -66,7 +66,7 @@
66 </ItemGroup> 66 </ItemGroup>
67 67
68 <ItemGroup> 68 <ItemGroup>
69 <ClInclude Include="caSuffix.h" /> 69 <ClInclude Include="caDecor.h" />
70 <ClInclude Include="cost.h" /> 70 <ClInclude Include="cost.h" />
71 <ClInclude Include="CustomMsiErrors.h" /> 71 <ClInclude Include="CustomMsiErrors.h" />
72 <ClInclude Include="precomp.h" /> 72 <ClInclude Include="precomp.h" />