sc: Print service status after 'start' and 'stop' commands.

Like Windows 10 sc.exe does.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2022-03-22 17:22:37 +03:00 committed by Alexandre Julliard
parent 921c86a35d
commit e75ebfb31f

View file

@ -322,6 +322,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
{
ret = StartServiceW( service, argc - 3, argv + 3 );
if (!ret) WINE_TRACE("failed to start service %lu\n", GetLastError());
else query_service( manager, argv[2] );
CloseServiceHandle( service );
}
else WINE_ERR("failed to open service %lu\n", GetLastError());
@ -333,6 +334,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
{
ret = ControlService( service, SERVICE_CONTROL_STOP, &status );
if (!ret) WINE_TRACE("failed to stop service %lu\n", GetLastError());
else query_service( manager, argv[2] );
CloseServiceHandle( service );
}
else WINE_ERR("failed to open service %lu\n", GetLastError());