This commit is contained in:
Alexander Aleksandrovič Klimov 2026-02-03 15:08:19 +01:00 committed by GitHub
commit 77db4bf060
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -791,6 +791,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);