Thread Win32::Service::GetStatus - (37 answers)
Opened by jan99 at 2015-03-06 10:41

rosti
 2023-12-08 11:01
#195638 #195638
User since
2011-03-19
3276 Artikel
BenutzerIn
[Homepage]
user image
Bei mir sieht die Abfrage ohne Adminrechte so aus:

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
Win32::Service::GetStatus($hostname, 'Apache2.2', $stat);
print Dumper $stat;

$VAR1 = {
          'ControlsAccepted' => 1,
          'CurrentState' => 4,
          'ServiceType' => 16,
          'Win32ExitCode' => 0,
          'CheckPoint' => 0,
          'ServiceSpecificExitCode' => 0,
          'WaitHint' => 0
        };


Wi brauchen also CurrentState und da stehen die Codes:

https://learn.microsoft.com/de-de/windows/win32/ap...

4 => Service Running

Eine Anmerkung: $hostname korrekt angeben oder ''

View full thread Win32::Service::GetStatus -