mirror of
https://github.com/reactos/reactos.git
synced 2024-09-29 14:09:10 +00:00
[WINESYNC] msi: Use the global is_wow64 variable in custom_start_server().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 12ae1f8528b18d0df018680747429be29fca7ea4 by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
parent
f31e4044c2
commit
9fb472fc26
|
@ -603,7 +603,6 @@ static DWORD custom_start_server(MSIPACKAGE *package, DWORD arch)
|
||||||
WCHAR buffer[24];
|
WCHAR buffer[24];
|
||||||
void *cookie;
|
void *cookie;
|
||||||
HANDLE pipe;
|
HANDLE pipe;
|
||||||
BOOL wow64;
|
|
||||||
|
|
||||||
if ((arch == SCS_32BIT_BINARY && package->custom_server_32_process) ||
|
if ((arch == SCS_32BIT_BINARY && package->custom_server_32_process) ||
|
||||||
(arch == SCS_64BIT_BINARY && package->custom_server_64_process))
|
(arch == SCS_64BIT_BINARY && package->custom_server_64_process))
|
||||||
|
@ -616,17 +615,14 @@ static DWORD custom_start_server(MSIPACKAGE *package, DWORD arch)
|
||||||
if (pipe == INVALID_HANDLE_VALUE)
|
if (pipe == INVALID_HANDLE_VALUE)
|
||||||
ERR("Failed to create custom action client pipe: %u\n", GetLastError());
|
ERR("Failed to create custom action client pipe: %u\n", GetLastError());
|
||||||
|
|
||||||
if (!IsWow64Process(GetCurrentProcess(), &wow64))
|
if ((sizeof(void *) == 8 || is_wow64) && arch == SCS_32BIT_BINARY)
|
||||||
wow64 = FALSE;
|
|
||||||
|
|
||||||
if ((sizeof(void *) == 8 || wow64) && arch == SCS_32BIT_BINARY)
|
|
||||||
GetSystemWow64DirectoryW(path, MAX_PATH - ARRAY_SIZE(L"\\msiexec.exe"));
|
GetSystemWow64DirectoryW(path, MAX_PATH - ARRAY_SIZE(L"\\msiexec.exe"));
|
||||||
else
|
else
|
||||||
GetSystemDirectoryW(path, MAX_PATH - ARRAY_SIZE(L"\\msiexec.exe"));
|
GetSystemDirectoryW(path, MAX_PATH - ARRAY_SIZE(L"\\msiexec.exe"));
|
||||||
lstrcatW(path, L"\\msiexec.exe");
|
lstrcatW(path, L"\\msiexec.exe");
|
||||||
swprintf(cmdline, ARRAY_SIZE(cmdline), L"%s -Embedding %d", path, GetCurrentProcessId());
|
swprintf(cmdline, ARRAY_SIZE(cmdline), L"%s -Embedding %d", path, GetCurrentProcessId());
|
||||||
|
|
||||||
if (wow64 && arch == SCS_64BIT_BINARY)
|
if (is_wow64 && arch == SCS_64BIT_BINARY)
|
||||||
{
|
{
|
||||||
Wow64DisableWow64FsRedirection(&cookie);
|
Wow64DisableWow64FsRedirection(&cookie);
|
||||||
CreateProcessW(path, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
|
CreateProcessW(path, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
|
||||||
|
|
Loading…
Reference in a new issue