diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index 160754a91b3..b250b1b068e 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -589,7 +589,7 @@ UINT CDECL __wine_msi_call_dll_function(const GUID *guid) static DWORD custom_start_server(MSIPACKAGE *package, DWORD arch) { - static const WCHAR pipe_name[] = {'\\','\\','.','\\','p','i','p','e','\\','m','s','i','c','a','_','%','x',0}; + static const WCHAR pipe_name[] = {'\\','\\','.','\\','p','i','p','e','\\','m','s','i','c','a','_','%','x','_','%','d',0}; static const WCHAR msiexecW[] = {'\\','m','s','i','e','x','e','c','.','e','x','e',0}; static const WCHAR argsW[] = {'%','s',' ','-','E','m','b','e','d','d','i','n','g',' ','%','d',0}; @@ -605,9 +605,11 @@ static DWORD custom_start_server(MSIPACKAGE *package, DWORD arch) (arch == SCS_64BIT_BINARY && package->custom_server_64_process)) return ERROR_SUCCESS; - sprintfW(buffer, pipe_name, GetCurrentProcessId()); + sprintfW(buffer, pipe_name, GetCurrentProcessId(), arch == SCS_32BIT_BINARY ? 32 : 64); pipe = CreateNamedPipeW(buffer, PIPE_ACCESS_DUPLEX, 0, 1, sizeof(DWORD64), sizeof(GUID), 0, NULL); + if (pipe == INVALID_HANDLE_VALUE) + ERR("Failed to create custom action client pipe: %u\n", GetLastError()); if (sizeof(void *) == 8 && arch == SCS_32BIT_BINARY) GetSystemWow64DirectoryW(path, MAX_PATH - sizeof(msiexecW)/sizeof(WCHAR)); diff --git a/programs/msiexec/msiexec.c b/programs/msiexec/msiexec.c index 47cef7e0fa2..ead3bfb9dea 100644 --- a/programs/msiexec/msiexec.c +++ b/programs/msiexec/msiexec.c @@ -406,7 +406,7 @@ static DWORD CALLBACK custom_action_thread(void *arg) static int custom_action_server(const WCHAR *arg) { - static const WCHAR pipe_name[] = {'\\','\\','.','\\','p','i','p','e','\\','m','s','i','c','a','_','%','x',0}; + static const WCHAR pipe_name[] = {'\\','\\','.','\\','p','i','p','e','\\','m','s','i','c','a','_','%','x','_','%','d',0}; DWORD client_pid = atoiW(arg); DWORD64 thread64; WCHAR buffer[24]; @@ -423,7 +423,7 @@ static int custom_action_server(const WCHAR *arg) return 1; } - sprintfW(buffer, pipe_name, client_pid); + sprintfW(buffer, pipe_name, client_pid, sizeof(void *) * 8); pipe = CreateFileW(buffer, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); if (pipe == INVALID_HANDLE_VALUE) {