This commit is contained in:
Alexander Aleksandrovič Klimov 2026-04-07 08:11:48 +00:00 committed by GitHub
commit 09d5e505ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -792,6 +792,14 @@ static int SetupService(bool install, int argc, char **argv)
return 1;
}
SERVICE_DELAYED_AUTO_START_INFO sdDASI = { TRUE };
if (!ChangeServiceConfig2(schService, SERVICE_CONFIG_DELAYED_AUTO_START_INFO, &sdDASI)) {
printf("ChangeServiceConfig2 failed (%d)\n", GetLastError());
CloseServiceHandle(schService);
CloseServiceHandle(schSCManager);
return 1;
}
if (!StartService(schService, 0, nullptr)) {
printf("StartService failed (%d)\n", GetLastError());
CloseServiceHandle(schService);