aboutsummaryrefslogtreecommitdiff
path: root/qga/service-win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'qga/service-win32.c')
-rw-r--r--qga/service-win32.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/qga/service-win32.c b/qga/service-win32.c
index 8a5de8a8b9..02926abb28 100644
--- a/qga/service-win32.c
+++ b/qga/service-win32.c
@@ -35,7 +35,8 @@ static int printf_win_error(const char *text)
return n;
}
-int ga_install_service(const char *path, const char *logfile)
+int ga_install_service(const char *path, const char *logfile,
+ const char *state_dir)
{
SC_HANDLE manager;
SC_HANDLE service;
@@ -56,6 +57,9 @@ int ga_install_service(const char *path, const char *logfile)
if (logfile) {
g_string_append_printf(cmdline, " -l %s -v", logfile);
}
+ if (state_dir) {
+ g_string_append_printf(cmdline, " -t %s", state_dir);
+ }
g_debug("service's cmdline: %s", cmdline->str);