advapi32: Start non-interactive services in a separate window station.

This commit is contained in:
Alexandre Julliard 2007-12-20 16:44:36 +01:00
parent a32873bfcc
commit 7593fac632
1 changed files with 6 additions and 0 deletions

View File

@ -1578,6 +1578,12 @@ static DWORD service_start_process(struct sc_service *hsvc, LPDWORD ppid)
handles[0] = service_get_event_handle( hsvc->name );
ZeroMemory(&si, sizeof(STARTUPINFOW));
si.cb = sizeof(STARTUPINFOW);
if (!(svc_type & SERVICE_INTERACTIVE_PROCESS))
{
static WCHAR desktopW[] = {'_','_','w','i','n','e','s','e','r','v','i','c','e','_','w','i','n','s','t','a','t','i','o','n','\\','D','e','f','a','u','l','t',0};
si.lpDesktop = desktopW;
}
r = CreateProcessW(NULL, path, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
if (r)
{