From 1cd08eee52ca3fff7a58926ef6d74a1af2e3fe6c Mon Sep 17 00:00:00 2001 From: Julen Urizar Compains Date: Tue, 4 Jun 2024 13:10:09 +0200 Subject: [PATCH] [MSI] CORE-18707 hack. Allow MSI under ROS amd64 to continue when GetSystemWow64DirectoryW is called (#6887) --- 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 f29699bd54b..b9637f4f95b 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; // HACK: 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; // HACK: 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 );