https://git.reactos.org/?p=reactos.git;a=commitdiff;h=49439bc1b41fe2e16f2eb…
commit 49439bc1b41fe2e16f2eb9e04f5e195d85f1f9a2
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sat Mar 12 23:54:33 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:28:00 2022 +0100
[WINESYNC] msi: Don't assume that WoW64 redirection is enabled in
custom_start_server().
As of 3a884c2ef the server is started on the main thread, so this is no
longer a valid assumption. In particular, we disable WoW64 redirection while
running standard actions, including the top-level INSTALL action.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=45663
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 51ad009bacd297c0607bc6de4d5dae18afe6ea98 by Zebediah Figura
<z.figura12(a)gmail.com>
---
dll/win32/msi/custom.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dll/win32/msi/custom.c b/dll/win32/msi/custom.c
index bdc9b39cd5c..0107cd941ed 100644
--- a/dll/win32/msi/custom.c
+++ b/dll/win32/msi/custom.c
@@ -616,14 +616,17 @@ static DWORD custom_start_server(MSIPACKAGE *package, DWORD arch)
if (pipe == INVALID_HANDLE_VALUE)
ERR("Failed to create custom action client pipe: %u\n",
GetLastError());
- if (sizeof(void *) == 8 && arch == SCS_32BIT_BINARY)
+ if (!IsWow64Process(GetCurrentProcess(), &wow64))
+ wow64 = FALSE;
+
+ if ((sizeof(void *) == 8 || wow64) && arch == SCS_32BIT_BINARY)
GetSystemWow64DirectoryW(path, MAX_PATH - sizeof(msiexecW)/sizeof(WCHAR));
else
GetSystemDirectoryW(path, MAX_PATH - sizeof(msiexecW)/sizeof(WCHAR));
strcatW(path, msiexecW);
sprintfW(cmdline, argsW, path, GetCurrentProcessId());
- if (IsWow64Process(GetCurrentProcess(), &wow64) && wow64 && arch
== SCS_64BIT_BINARY)
+ if (wow64 && arch == SCS_64BIT_BINARY)
{
Wow64DisableWow64FsRedirection(&cookie);
CreateProcessW(path, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si,
&pi);