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

Alexandre Julliard julliard at winehq.org
Tue Mar 29 15:09:54 CDT 2022


Module: wine
Branch: master
Commit: e75ebfb31f03d9de67fb3240aa2556abc4a900cb
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=e75ebfb31f03d9de67fb3240aa2556abc4a900cb

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Tue Mar 22 17:22:37 2022 +0300

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

Like Windows 10 sc.exe does.

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/sc/sc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/programs/sc/sc.c b/programs/sc/sc.c
index 9e8bfb61f42..3b029f33c78 100644
--- a/programs/sc/sc.c
+++ b/programs/sc/sc.c
@@ -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());




More information about the wine-cvs mailing list