aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-01-10 11:01:41 +0100
committerDan Engelbrecht <[email protected]>2025-01-10 11:01:41 +0100
commitc2cb52446fddbcca417387e2a7ef2ee8ec0a9549 (patch)
tree59c98a3d8f32a7c7e61f0b7ba0713e7cdfb1a397 /src
parentif we can't open a process handle, assume it is running under other user id (diff)
downloadzen-c2cb52446fddbcca417387e2a7ef2ee8ec0a9549.tar.xz
zen-c2cb52446fddbcca417387e2a7ef2ee8ec0a9549.zip
use local service account for zen service
Diffstat (limited to 'src')
-rw-r--r--src/zenutil/service.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/zenutil/service.cpp b/src/zenutil/service.cpp
index 34d7c2eb6..72367a070 100644
--- a/src/zenutil/service.cpp
+++ b/src/zenutil/service.cpp
@@ -306,19 +306,19 @@ InstallService(std::string_view ServiceName, const ServiceSpec& Spec)
Utf8ToWide(Spec.CommandLineOptions, Path);
}
- SC_HANDLE schService = CreateService(schSCManager, // SCM database
- Name.c_str(), // name of service
- DisplayName.c_str(), // service name to display
- SERVICE_ALL_ACCESS, // desired access
- SERVICE_WIN32_OWN_PROCESS, // service type
- SERVICE_DEMAND_START, // start type
- SERVICE_ERROR_NORMAL, // error control type
- Path.c_str(), // path to service's binary
- NULL, // no load ordering group
- NULL, // no tag identifier
- NULL, // no dependencies
- NULL, // LocalSystem account
- NULL); // no password
+ SC_HANDLE schService = CreateService(schSCManager, // SCM database
+ Name.c_str(), // name of service
+ DisplayName.c_str(), // service name to display
+ SERVICE_ALL_ACCESS, // desired access
+ SERVICE_WIN32_OWN_PROCESS, // service type
+ SERVICE_AUTO_START, // start type
+ SERVICE_ERROR_NORMAL, // error control type
+ Path.c_str(), // path to service's binary
+ NULL, // no load ordering group
+ NULL, // no tag identifier
+ NULL, // no dependencies
+ TEXT("NT AUTHORITY\\LocalService"), // LocalService account
+ NULL); // no password
if (schService == NULL)
{