- getcwd(mypath, OS_MAXSTR -1);
- strncat(mypath, "\\", OS_MAXSTR - (strlen(mypath) + 2));
- strncat(mypath, myfile, OS_MAXSTR - (strlen(mypath) + 2));
-
-
- if(argc > 1)
- {
- if(strcmp(argv[1], "install-service") == 0)
- {
- return(InstallService(mypath));
- }
- else if(strcmp(argv[1], "uninstall-service") == 0)
- {
- return(UninstallService());
- }
- else if(strcmp(argv[1], "start") == 0)
- {
- return(local_start());
- }
- else if(strcmp(argv[1], "-h") == 0)
- {
+ getcwd(mypath, OS_MAXSTR - 1);
+ snprintf(myfinalpath, OS_MAXSTR, "\"%s\\%s\"", mypath, myfile);
+
+ if (argc > 1) {
+ if (strcmp(argv[1], "install-service") == 0) {
+ return (InstallService(myfinalpath));
+ } else if (strcmp(argv[1], "uninstall-service") == 0) {
+ return (UninstallService());
+ } else if (strcmp(argv[1], "start") == 0) {
+ return (local_start());
+ } else if (strcmp(argv[1], "/?") == 0) {