https://git.reactos.org/?p=reactos.git;a=commitdiff;h=eb532bc64159f62ca766e…
commit eb532bc64159f62ca766efa1bb8a2d199dcf95e9
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sat Jul 20 15:50:35 2019 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sat Jul 20 15:51:39 2019 +0200
[WMISVC] Accept stop and shutdown commands when the service is running.
---
base/services/wmisvc/wmisvc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/base/services/wmisvc/wmisvc.c b/base/services/wmisvc/wmisvc.c
index 042ff84e3df..9ec17bb71b0 100644
--- a/base/services/wmisvc/wmisvc.c
+++ b/base/services/wmisvc/wmisvc.c
@@ -66,6 +66,9 @@ UpdateServiceStatus(DWORD dwState)
else
ServiceStatus.dwWaitHint = 0;
+ if (dwState == SERVICE_RUNNING)
+ ServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP |
SERVICE_ACCEPT_SHUTDOWN;
+
SetServiceStatus(ServiceStatusHandle,
&ServiceStatus);
}