aboutsummaryrefslogtreecommitdiff
path: root/service-win32/service.c
diff options
context:
space:
mode:
Diffstat (limited to 'service-win32/service.c')
-rw-r--r--service-win32/service.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/service-win32/service.c b/service-win32/service.c
index d5211bd..91b5821 100644
--- a/service-win32/service.c
+++ b/service-win32/service.c
@@ -370,11 +370,13 @@ int CmdInstallService()
int ret = 0;
- if ( GetModuleFileName( NULL, szPath, 512 ) == 0 )
+ if ( GetModuleFileName( NULL, szPath+1, 510 ) == 0 )
{
_tprintf(TEXT("Unable to install %s - %s\n"), TEXT(SZSERVICEDISPLAYNAME), GetLastErrorText(szErr, 256));
return 1;
}
+ szPath[0] = '\"';
+ strcat(szPath, "\"");
schSCManager = OpenSCManager(
NULL, // machine (NULL == local)