From 1139f5615074549e826067a0b15c77806240350f Mon Sep 17 00:00:00 2001 From: Julen Urizar Compains Date: Tue, 14 May 2024 20:50:29 +0200 Subject: [PATCH] [MSI] CORE-18707 hack. Allow MSI under ROS amd64 to continue when GetSystemWow64DirectoryW is called [MSI] Fix minor indentation and spaces before brackets. [MSI] Minor fixes and correctly reporting ERR instead of WARN [MSI] Fixing a warning and the whitespaces --- dll/win32/msi/custom.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/dll/win32/msi/custom.c b/dll/win32/msi/custom.c index f29699bd54b24..68325e4a86525 100644 --- a/dll/win32/msi/custom.c +++ b/dll/win32/msi/custom.c @@ -867,6 +867,17 @@ static UINT HANDLE_CustomType1( MSIPACKAGE *package, const WCHAR *source, const if (!(binary = get_temp_binary(package, source))) return ERROR_FUNCTION_FAILED; +#if defined(__REACTOS__) && defined(_M_AMD64) + { + DWORD arch; + get_binary_type(binary->tmpfile, &arch); + if (arch == SCS_32BIT_BINARY) { + ERR("%s is a 32 bit custom action. Returning as ERROR_SUCCESS\n", debugstr_w(source)); + return ERROR_SUCCESS; // NO WOW64! return as executed though it's not true + } + } + #endif + TRACE("Calling function %s from %s\n", debugstr_w(target), debugstr_w(binary->tmpfile)); if (!(info = do_msidbCustomActionTypeDll( package, type, binary->tmpfile, target, action ))) @@ -975,6 +986,17 @@ static UINT HANDLE_CustomType17( MSIPACKAGE *package, const WCHAR *source, const return ERROR_FUNCTION_FAILED; } +#if defined(__REACTOS__) && defined(_M_AMD64) + { + DWORD arch; + get_binary_type(file->TargetPath, &arch); + if (arch == SCS_32BIT_BINARY) { + ERR("%s is a 32 bit custom action. Returning as ERROR_SUCCESS\n", debugstr_w(source)); + return ERROR_SUCCESS; // NO WOW64! return as executed though it's not true + } + } +#endif + if (!(info = do_msidbCustomActionTypeDll( package, type, file->TargetPath, target, action ))) return ERROR_FUNCTION_FAILED; return wait_thread_handle( info );