mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 23:22:57 +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"));
|
_tprintf(_T("Remote service control is not yet implemented\n"));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
hSCManager = OpenSCManager(MachineName, NULL, SC_MANAGER_ALL_ACCESS);
|
hSCManager = OpenSCManager(MachineName, NULL, SC_MANAGER_ALL_ACCESS);
|
||||||
if (hSCManager == NULL)
|
if (hSCManager == NULL)
|
||||||
{
|
{
|
||||||
|
@ -60,7 +60,7 @@ INT ScControl(LPTSTR MachineName, LPCTSTR Command, TCHAR **Args)
|
||||||
ReportLastError();
|
ReportLastError();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
if (_tcsicmp(Command, _T("query")) == 0)
|
if (_tcsicmp(Command, _T("query")) == 0)
|
||||||
Query(Args, FALSE);
|
Query(Args, FALSE);
|
||||||
|
@ -71,7 +71,7 @@ INT ScControl(LPTSTR MachineName, LPCTSTR Command, TCHAR **Args)
|
||||||
else if (_tcsicmp(Command, _T("start")) == 0)
|
else if (_tcsicmp(Command, _T("start")) == 0)
|
||||||
{
|
{
|
||||||
if (*Args)
|
if (*Args)
|
||||||
Start(3, Args);
|
Start(0, Args);
|
||||||
else
|
else
|
||||||
StartUsage();
|
StartUsage();
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,13 +21,15 @@ BOOL Start(INT ArgCount, TCHAR **Args)
|
||||||
|
|
||||||
|
|
||||||
/* testing */
|
/* testing */
|
||||||
printf("service to start - %s\n\n", ServiceName);
|
_tprintf(_T("service to start - %s\n\n"), ServiceName);
|
||||||
printf("Arguments :\n");
|
_tprintf(_T("Arguments :\n"));
|
||||||
while (*ServiceArgs)
|
while (*ServiceArgs)
|
||||||
{
|
{
|
||||||
printf("%s\n", *ServiceArgs);
|
printf("%s\n", *ServiceArgs);
|
||||||
ServiceArgs++;
|
ServiceArgs++;
|
||||||
}
|
}
|
||||||
|
if (! *ServiceArgs)
|
||||||
|
ServiceArgs = NULL;
|
||||||
|
|
||||||
/* get a handle to the service requested for starting */
|
/* get a handle to the service requested for starting */
|
||||||
hSc = OpenService(hSCManager, ServiceName, SERVICE_ALL_ACCESS);
|
hSc = OpenService(hSCManager, ServiceName, SERVICE_ALL_ACCESS);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue