Started testing. Couple of code mods to get 'sc start ...' working.
authorGed Murphy <gedmurphy@reactos.org>
Fri, 4 Nov 2005 00:20:17 +0000 (00:20 +0000)
committerGed Murphy <gedmurphy@reactos.org>
Fri, 4 Nov 2005 00:20:17 +0000 (00:20 +0000)
svn path=/trunk/; revision=18982

reactos/subsys/system/sc/sc.c
reactos/subsys/system/sc/start.c

index 7dfac1f..551460e 100644 (file)
@@ -52,7 +52,7 @@ INT ScControl(LPTSTR MachineName, LPCTSTR Command, TCHAR **Args)
         _tprintf(_T("Remote service control is not yet implemented\n"));
         return 2;
     }
-/*
+
     hSCManager = OpenSCManager(MachineName, NULL, SC_MANAGER_ALL_ACCESS);
     if (hSCManager == NULL)
     {
@@ -60,7 +60,7 @@ INT ScControl(LPTSTR MachineName, LPCTSTR Command, TCHAR **Args)
         ReportLastError();
         return -1;
     }
-*/
+
 
     if (_tcsicmp(Command, _T("query")) == 0)
         Query(Args, FALSE);
@@ -71,7 +71,7 @@ INT ScControl(LPTSTR MachineName, LPCTSTR Command, TCHAR **Args)
     else if (_tcsicmp(Command, _T("start")) == 0)
     {
         if (*Args)
-            Start(3, Args);
+            Start(0, Args);
         else
             StartUsage();
     }
index 6e00c13..f945dcd 100644 (file)
@@ -21,13 +21,15 @@ BOOL Start(INT ArgCount, TCHAR **Args)
     
 
     /* testing */
-    printf("service to start - %s\n\n", ServiceName);
-    printf("Arguments :\n");
+    _tprintf(_T("service to start - %s\n\n"), ServiceName);
+    _tprintf(_T("Arguments :\n"));
     while (*ServiceArgs)
     {
         printf("%s\n", *ServiceArgs);
         ServiceArgs++;
     }
+       if (! *ServiceArgs)
+               ServiceArgs = NULL;
 
     /* get a handle to the service requested for starting */
     hSc = OpenService(hSCManager, ServiceName, SERVICE_ALL_ACCESS);