StartupInfo.cb = sizeof(StartupInfo);
ZeroMemory(&ProcessInformation, sizeof(ProcessInformation));
- /* Use the interactive desktop if the service is interactive */
- if ((NoInteractiveServices == 0) &&
- (Service->Status.dwServiceType & SERVICE_INTERACTIVE_PROCESS))
- {
- StartupInfo.dwFlags |= STARTF_INHERITDESKTOP;
- StartupInfo.lpDesktop = L"WinSta0\\Default";
- }
-
if (Service->lpImage->hToken)
{
/* User token: Run the service under the user account */
lpEnvironment = NULL;
}
+ /* Use the interactive desktop if the service is interactive */
+ if ((NoInteractiveServices == 0) &&
+ (Service->Status.dwServiceType & SERVICE_INTERACTIVE_PROCESS))
+ {
+ StartupInfo.dwFlags |= STARTF_INHERITDESKTOP;
+ StartupInfo.lpDesktop = L"WinSta0\\Default";
+ }
+
Result = CreateProcessW(NULL,
Service->lpImage->pszImagePath,
NULL,