mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 19:55:41 +00:00
Started testing. Couple of code mods to get 'sc start ...' working.
svn path=/trunk/; revision=18982
This commit is contained in:
parent
13415bb36a
commit
c743bc7da5
2 changed files with 7 additions and 5 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue