@joebigelow / wix / commits / a4dc574f

Skip Wow64 redirection on 64-bit CA builds.

Bob Arnson committed Aug 23, 2021 at 19:05 UTC a4dc574fa13d828614058906c4e99fcb45965fe5
1 file changed +10
src/ext/Util/ca/RemoveFoldersEx.cpp
+10
@@ -28,11 +28,15 @@ static HRESULT RecursePath(
28 WIN32_FIND_DATAW wfd;
29 LPWSTR sczNext = NULL;
30
31 +#ifdef _WIN64
32 + UNREFERENCED_PARAMETER(fDisableWow64Redirection);
33 +#else
34 if (fDisableWow64Redirection)
35 {
36 hr = WcaDisableWow64FSRedirection();
37 ExitOnFailure(hr, "Custom action was told to act on a 64-bit component, but was unable to disable filesystem redirection through the Wow64 API.");
38 }
39 +#endif
40
41 // First recurse down to all the child directories.
42 hr = StrAllocFormatted(&sczSearch, L"%s*", wzPath);
@@ -103,10 +107,12 @@ LExit:
107 ::FindClose(hFind);
108 }
109
110 +#ifndef _WIN64
111 if (fDisableWow64Redirection)
112 {
113 WcaRevertWow64FSRedirection();
114 }
115 +#endif
116
117 ReleaseStr(sczNext);
118 ReleaseStr(sczProperty);
@@ -140,7 +146,9 @@ extern "C" UINT WINAPI WixRemoveFoldersEx(
146 hr = WcaInitialize(hInstall, "WixRemoveFoldersEx");
147 ExitOnFailure(hr, "Failed to initialize WixRemoveFoldersEx.");
148
149 +#ifndef _WIN64
150 WcaInitializeWow64();
151 +#endif
152
153 // anything to do?
154 if (S_OK != WcaTableExists(L"Wix4RemoveFolderEx"))
@@ -219,7 +227,9 @@ extern "C" UINT WINAPI WixRemoveFoldersEx(
227 ExitOnFailure(hr, "Failure occured while processing Wix4RemoveFolderEx table");
228
229 LExit:
230 +#ifndef _WIN64
231 WcaFinalizeWow64();
232 +#endif
233
234 if (hColumns)
235 {