Commit d1ccbceb authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Various background processes must be launched detached from current console (if any).

parent fcc204c9
...@@ -630,7 +630,7 @@ static void run_winebrowser(const WCHAR *url) ...@@ -630,7 +630,7 @@ static void run_winebrowser(const WCHAR *url)
memset(&si, 0, sizeof(si)); memset(&si, 0, sizeof(si));
si.cb = sizeof(si); si.cb = sizeof(si);
ret = CreateProcessW(app, args, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); ret = CreateProcessW(app, args, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &si, &pi);
heap_free(args); heap_free(args);
if (ret) { if (ret) {
CloseHandle(pi.hThread); CloseHandle(pi.hThread);
......
...@@ -656,7 +656,7 @@ static HRESULT WINAPI IDirectInputAImpl_RunControlPanel(LPDIRECTINPUT7A iface, ...@@ -656,7 +656,7 @@ static HRESULT WINAPI IDirectInputAImpl_RunControlPanel(LPDIRECTINPUT7A iface,
if (!This->initialized) if (!This->initialized)
return DIERR_NOTINITIALIZED; return DIERR_NOTINITIALIZED;
if (!CreateProcessW(NULL, control_exeW, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) if (!CreateProcessW(NULL, control_exeW, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &si, &pi))
return HRESULT_FROM_WIN32(GetLastError()); return HRESULT_FROM_WIN32(GetLastError());
return DI_OK; return DI_OK;
......
...@@ -108,7 +108,7 @@ static BOOL run_winemenubuilder( const WCHAR *args ) ...@@ -108,7 +108,7 @@ static BOOL run_winemenubuilder( const WCHAR *args )
si.cb = sizeof(si); si.cb = sizeof(si);
Wow64DisableWow64FsRedirection( &redir ); Wow64DisableWow64FsRedirection( &redir );
ret = CreateProcessW( app, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi ); ret = CreateProcessW( app, buffer, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &si, &pi );
Wow64RevertWow64FsRedirection( redir ); Wow64RevertWow64FsRedirection( redir );
heap_free( buffer ); heap_free( buffer );
......
...@@ -146,7 +146,7 @@ static BOOL start_rpcss(void) ...@@ -146,7 +146,7 @@ static BOOL start_rpcss(void)
strcatW( cmd, rpcss ); strcatW( cmd, rpcss );
Wow64DisableWow64FsRedirection( &redir ); Wow64DisableWow64FsRedirection( &redir );
rslt = CreateProcessW( cmd, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi ); rslt = CreateProcessW( cmd, cmd, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &si, &pi );
Wow64RevertWow64FsRedirection( redir ); Wow64RevertWow64FsRedirection( redir );
if (rslt) if (rslt)
......
...@@ -1680,7 +1680,7 @@ static HRESULT create_server(REFCLSID rclsid, HANDLE *process) ...@@ -1680,7 +1680,7 @@ static HRESULT create_server(REFCLSID rclsid, HANDLE *process)
/* FIXME: Win2003 supports a ServerExecutable value that is passed into /* FIXME: Win2003 supports a ServerExecutable value that is passed into
* CreateProcess */ * CreateProcess */
if (!CreateProcessW(NULL, command, NULL, NULL, FALSE, 0, NULL, NULL, &sinfo, &pinfo)) { if (!CreateProcessW(NULL, command, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &sinfo, &pinfo)) {
WARN("failed to run local server %s\n", debugstr_w(command)); WARN("failed to run local server %s\n", debugstr_w(command));
return HRESULT_FROM_WIN32(GetLastError()); return HRESULT_FROM_WIN32(GetLastError());
} }
......
...@@ -92,7 +92,7 @@ static BOOL start_rpcss(void) ...@@ -92,7 +92,7 @@ static BOOL start_rpcss(void)
lstrcatW( cmd, rpcss ); lstrcatW( cmd, rpcss );
Wow64DisableWow64FsRedirection( &redir ); Wow64DisableWow64FsRedirection( &redir );
rslt = CreateProcessW( cmd, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi ); rslt = CreateProcessW( cmd, cmd, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &si, &pi );
Wow64RevertWow64FsRedirection( redir ); Wow64RevertWow64FsRedirection( redir );
if (rslt) if (rslt)
......
...@@ -439,7 +439,7 @@ BOOL run_winemenubuilder( const WCHAR *args ) ...@@ -439,7 +439,7 @@ BOOL run_winemenubuilder( const WCHAR *args )
si.cb = sizeof(si); si.cb = sizeof(si);
Wow64DisableWow64FsRedirection( &redir ); Wow64DisableWow64FsRedirection( &redir );
ret = CreateProcessW( app, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi ); ret = CreateProcessW( app, buffer, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &si, &pi );
Wow64RevertWow64FsRedirection( redir ); Wow64RevertWow64FsRedirection( redir );
HeapFree( GetProcessHeap(), 0, buffer ); HeapFree( GetProcessHeap(), 0, buffer );
......
...@@ -851,7 +851,7 @@ static BOOL start_services_process(void) ...@@ -851,7 +851,7 @@ static BOOL start_services_process(void)
strcatW(path, services); strcatW(path, services);
ZeroMemory(&si, sizeof(si)); ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si); si.cb = sizeof(si);
if (!CreateProcessW(path, path, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi)) if (!CreateProcessW(path, path, NULL, NULL, TRUE, DETACHED_PROCESS, NULL, NULL, &si, &pi))
{ {
WINE_ERR("Couldn't start services.exe: error %u\n", GetLastError()); WINE_ERR("Couldn't start services.exe: error %u\n", GetLastError());
return FALSE; return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment