@joebigelow / wix-1 / commits / 176f0dc2

Fix missing prefixes in IIS table names.

Fixes https://github.com/wixtoolset/issues/issues/7120.

Bob Arnson committed Jan 1, 2023 at 22:00 UTC 176f0dc2a382ebac3c3fdfb8afd688e0c98126fc
3 files changed +21 -21
src/ext/Iis/ca/scacert.cpp
+1 -1
@@ -168,7 +168,7 @@ static HRESULT ConfigureCertificates(
168 DWORD_PTR cbPFXPassword = 0;
169
170 // Bail quickly if the Certificate table isn't around.
171 - if (S_OK != WcaTableExists(L"Certificate"))
171 + if (S_OK != WcaTableExists(L"Wix4Certificate"))
172 {
173 WcaLog(LOGMSG_VERBOSE, "Skipping ConfigureCertificates() - required table not present.");
174 ExitFunction1(hr = S_FALSE);
src/ext/Iis/ca/scasched.cpp
+19 -19
@@ -53,7 +53,7 @@ LPCWSTR vcsWebDirQuery = L"SELECT `Web_`, `WebDir`, `Component_`, `Path`, `DirPr
53 L"FROM `Wix4IIsWebDir`";
54
55 LPCWSTR vcsVDirQuery = L"SELECT `Web_`, `VirtualDir`, `Component_`, `Alias`, `Directory_`, `DirProperties_`, `Application_` "
56 - L"FROM `IIsWebVirtualDir`";
56 + L"FROM `Wix4IIsWebVirtualDir`";
57
58 LPCWSTR vcsFilterQuery = L"SELECT `Web_`, `Name`, `Component_`, `Path`, `Description`, `Flags`, `LoadOrder` FROM `Wix4IIsFilter` ORDER BY `Web_`";
59
@@ -83,8 +83,8 @@ extern "C" UINT __stdcall ConfigureIIs(
83 ExitOnFailure(hr, "Failed to initialize");
84
85 // check for the prerequsite tables
86 - if (S_OK != WcaTableExists(L"IIsWebSite") && S_OK != WcaTableExists(L"IIsFilter") && S_OK != WcaTableExists(L"IIsProperty") &&
87 - S_OK != WcaTableExists(L"IIsWebServiceExtension") && S_OK != WcaTableExists(L"IIsAppPool"))
86 + if (S_OK != WcaTableExists(L"Wix4IIsWebSite") && S_OK != WcaTableExists(L"Wix4IIsFilter") && S_OK != WcaTableExists(L"Wix4IIsProperty") &&
87 + S_OK != WcaTableExists(L"Wix4IIsWebServiceExtension") && S_OK != WcaTableExists(L"Wix4IIsAppPool"))
88 {
89 WcaLog(LOGMSG_VERBOSE, "skipping IIs CustomAction, no IIsWebSite table, no IIsFilter table, no IIsProperty table, no IIsWebServiceExtension, and no IIsAppPool table");
90 ExitFunction1(hr = S_FALSE);
@@ -120,7 +120,7 @@ extern "C" UINT __stdcall ConfigureIIs(
120 ExitOnFailure(hr, "Failed to add encoding key to CustomActionData.");
121
122 // Wrap vcsUserDeferredQuery to send to deferred CA
123 - if (S_OK == WcaTableExists(L"User"))
123 + if (S_OK == WcaTableExists(L"Wix4User"))
124 {
125 hr = WcaWrapQuery(vcsUserDeferredQuery, &pwzCustomActionData, efmcColumn3 | efmcColumn4 | efmcColumn5, 0xFFFFFFFF, 0xFFFFFFFF);
126 ExitOnFailure(hr, "Failed to wrap User query");
@@ -132,7 +132,7 @@ extern "C" UINT __stdcall ConfigureIIs(
132 }
133
134 // Wrap vcsWebSvcExtQuery to send to deferred CA
135 - if (S_OK == WcaTableExists(L"IIsWebServiceExtension"))
135 + if (S_OK == WcaTableExists(L"Wix4IIsWebServiceExtension"))
136 {
137 hr = WcaWrapQuery(vcsWebSvcExtQuery, &pwzCustomActionData, efmcColumn2 | efmcColumn3 | efmcColumn4, 1, 0xFFFFFFFF);
138 ExitOnFailure(hr, "Failed to wrap IIsWebServiceExtension query");
@@ -144,7 +144,7 @@ extern "C" UINT __stdcall ConfigureIIs(
144 }
145
146 // Wrap vcsAppPoolQuery to send to deferred CA
147 - if (S_OK == WcaTableExists(L"IIsAppPool"))
147 + if (S_OK == WcaTableExists(L"Wix4IIsAppPool"))
148 {
149 hr = WcaWrapQuery(vcsAppPoolQuery, &pwzCustomActionData, efmcColumn2 | efmcColumn15 | efmcColumn16, 3, 0xFFFFFFFF);
150 ExitOnFailure(hr, "Failed to wrap IIsAppPool query");
@@ -159,7 +159,7 @@ extern "C" UINT __stdcall ConfigureIIs(
159 }
160
161 // Wrap vcsMimeMapQuery to send to deferred CA
162 - if (S_OK == WcaTableExists(L"IIsMimeMap"))
162 + if (S_OK == WcaTableExists(L"Wix4IIsMimeMap"))
163 {
164 hr = WcaWrapQuery(vcsMimeMapQuery, &pwzCustomActionData, efmcColumn4 | efmcColumn5, 0xFFFFFFFF, 0xFFFFFFFF);
165 ExitOnFailure(hr, "Failed to wrap IIsMimeMap query");
@@ -171,7 +171,7 @@ extern "C" UINT __stdcall ConfigureIIs(
171 }
172
173 // Wrap vcsHttpHeaderQuery to send to deferred CA
174 - if (S_OK == WcaTableExists(L"IIsHttpHeader"))
174 + if (S_OK == WcaTableExists(L"Wix4IIsHttpHeader"))
175 {
176 hr = WcaWrapQuery(vcsHttpHeaderQuery, &pwzCustomActionData, efmcColumn1 | efmcColumn4, 0xFFFFFFFF, 0xFFFFFFFF);
177 ExitOnFailure(hr, "Failed to wrap IIsHttpHeader query");
@@ -183,7 +183,7 @@ extern "C" UINT __stdcall ConfigureIIs(
183 }
184
185 // Wrap vcsWebErrorQuery to send to deferred CA
186 - if (S_OK == WcaTableExists(L"IIsWebError"))
186 + if (S_OK == WcaTableExists(L"Wix4IIsWebError"))
187 {
188 hr = WcaWrapQuery(vcsWebErrorQuery, &pwzCustomActionData, efmcColumn5 | efmcColumn6, 0xFFFFFFFF, 0xFFFFFFFF);
189 ExitOnFailure(hr, "Failed to wrap IIsWebError query");
@@ -195,7 +195,7 @@ extern "C" UINT __stdcall ConfigureIIs(
195 }
196
197 // Wrap vcsWebDirPropertiesQuery to send to deferred CA
198 - if (S_OK == WcaTableExists(L"IIsWebDirProperties"))
198 + if (S_OK == WcaTableExists(L"Wix4IIsWebDirProperties"))
199 {
200 hr = WcaWrapQuery(vcsWebDirPropertiesQuery, &pwzCustomActionData, efmcColumn8 | efmcColumn10 | efmcColumn12 | efmcColumn15, 0xFFFFFFFF, 0xFFFFFFFF);
201 ExitOnFailure(hr, "Failed to wrap IIsWebDirProperties query");
@@ -207,7 +207,7 @@ extern "C" UINT __stdcall ConfigureIIs(
207 }
208
209 // Wrap vcsSslCertificateQuery to send to deferred CA
210 - if (S_OK == WcaTableExists(L"Certificate") && S_OK == WcaTableExists(L"CertificateHash") && S_OK == WcaTableExists(L"IIsWebSiteCertificates"))
210 + if (S_OK == WcaTableExists(L"Wix4Certificate") && S_OK == WcaTableExists(L"Wix4CertificateHash") && S_OK == WcaTableExists(L"Wix4IIsWebSiteCertificates"))
211 {
212 hr = WcaWrapQuery(vcsSslCertificateQuery, &pwzCustomActionData, 0, 0xFFFFFFFF, 0xFFFFFFFF);
213 ExitOnFailure(hr, "Failed to wrap SslCertificate query");
@@ -219,7 +219,7 @@ extern "C" UINT __stdcall ConfigureIIs(
219 }
220
221 // Wrap vcsWebLogQuery to send to deferred CA
222 - if (S_OK == WcaTableExists(L"IIsWebLog"))
222 + if (S_OK == WcaTableExists(L"Wix4IIsWebLog"))
223 {
224 hr = WcaWrapQuery(vcsWebLogQuery, &pwzCustomActionData, efmcColumn2, 0xFFFFFFFF, 0xFFFFFFFF);
225 ExitOnFailure(hr, "Failed to wrap IIsWebLog query");
@@ -231,7 +231,7 @@ extern "C" UINT __stdcall ConfigureIIs(
231 }
232
233 // Wrap vcsWebApplicationQuery to send to deferred CA
234 - if (S_OK == WcaTableExists(L"IIsWebApplication"))
234 + if (S_OK == WcaTableExists(L"Wix4IIsWebApplication"))
235 {
236 hr = WcaWrapQuery(vcsWebApplicationQuery, &pwzCustomActionData, efmcColumn1, 0xFFFFFFFF, 0xFFFFFFFF);
237 ExitOnFailure(hr, "Failed to wrap IIsWebApplication query");
@@ -243,7 +243,7 @@ extern "C" UINT __stdcall ConfigureIIs(
243 }
244
245 // Wrap vcsWebAppExtensionQuery to send to deferred CA
246 - if (S_OK == WcaTableExists(L"IIsWebApplicationExtension"))
246 + if (S_OK == WcaTableExists(L"Wix4IIsWebApplicationExtension"))
247 {
248 hr = WcaWrapQuery(vcsWebAppExtensionQuery, &pwzCustomActionData, efmcColumn2 | efmcColumn3, 0xFFFFFFFF, 0xFFFFFFFF);
249 ExitOnFailure(hr, "Failed to wrap IIsWebApplicationExtension query");
@@ -255,7 +255,7 @@ extern "C" UINT __stdcall ConfigureIIs(
255 }
256
257 // Wrap vcsWebQuery, vcsWebAddressQuery, and vcsWebBaseQuery to send to deferred CA
258 - if (S_OK == WcaTableExists(L"IIsWebAddress") && S_OK == WcaTableExists(L"IIsWebSite"))
258 + if (S_OK == WcaTableExists(L"Wix4IIsWebAddress") && S_OK == WcaTableExists(L"Wix4IIsWebSite"))
259 {
260 hr = WcaWrapQuery(vcsWebQuery, &pwzCustomActionData, efmcColumn3 | efmcColumn4 | efmcColumn12 | efmcColumn13 | efmcColumn14, 2, 6);
261 ExitOnFailure(hr, "Failed to wrap IIsWebSite query");
@@ -279,7 +279,7 @@ extern "C" UINT __stdcall ConfigureIIs(
279 }
280
281 // Wrap vcsWebDirQuery to send to deferred CA
282 - if (S_OK == WcaTableExists(L"IIsWebDir"))
282 + if (S_OK == WcaTableExists(L"Wix4IIsWebDir"))
283 {
284 hr = WcaWrapQuery(vcsWebDirQuery, &pwzCustomActionData, efmcColumn4, 3, 0xFFFFFFFF);
285 ExitOnFailure(hr, "Failed to wrap IIsWebDir query");
@@ -291,7 +291,7 @@ extern "C" UINT __stdcall ConfigureIIs(
291 }
292
293 // Wrap vcsVDirQuery to send to deferred CA
294 - if (S_OK == WcaTableExists(L"IIsWebVirtualDir"))
294 + if (S_OK == WcaTableExists(L"Wix4IIsWebVirtualDir"))
295 {
296 hr = WcaWrapQuery(vcsVDirQuery, &pwzCustomActionData, efmcColumn4, 3, 5);
297 ExitOnFailure(hr, "Failed to wrap IIsWebVirtualDir query");
@@ -303,7 +303,7 @@ extern "C" UINT __stdcall ConfigureIIs(
303 }
304
305 // Wrap vcsFilterQuery to send to deferred CA
306 - if (S_OK == WcaTableExists(L"IIsFilter"))
306 + if (S_OK == WcaTableExists(L"Wix4IIsFilter"))
307 {
308 hr = WcaWrapQuery(vcsFilterQuery, &pwzCustomActionData, efmcColumn4 | efmcColumn5, 3, 0xFFFFFFFF);
309 ExitOnFailure(hr, "Failed to wrap IIsFilter query");
@@ -315,7 +315,7 @@ extern "C" UINT __stdcall ConfigureIIs(
315 }
316
317 // Wrap vcsPropertyQuery to send to deferred CA
318 - if (S_OK == WcaTableExists(L"IIsProperty"))
318 + if (S_OK == WcaTableExists(L"Wix4IIsProperty"))
319 {
320 hr = WcaWrapQuery(vcsPropertyQuery, &pwzCustomActionData, efmcColumn4, 2, 0xFFFFFFFF);
321 ExitOnFailure(hr, "Failed to wrap IIsProperty query");
src/ext/Iis/ca/scaweblog7.cpp
+1 -1
@@ -3,7 +3,7 @@
3 #include "precomp.h"
4 // sql queries
5 LPCWSTR vcsWebLogQuery7 = L"SELECT `Log`, `Format` "
6 - L"FROM `Wix4IIsWebLog` WHERE `Log`=?";
6 + L"FROM `Wix4IIsWebLog` WHERE `Log`=?";
7
8 enum eWebLogQuery { wlqLog = 1, wlqFormat };
9