A Dim searcher As New ManagementObjectSearcher("Select * from Win32_service where
State =
'Paused'")
For Each svc As ManagementObject In searcher.[Get]()
Collection1.Add(svc("DisplayName"))
Next
B Dim searcher As New ManagementObjectSearcher("Select * from Win32_service", "State =
'Paused'")
For Each svc As ManagementObject In searcher.[Get]()
Collection1.Add(svc("DisplayName"))
Next
C Dim searcher As New ManagementObjectSearcher("Select * from Win32_service")
For Each svc As ManagementObject In searcher.[Get]()
If DirectCast(svc("State"), String) = "'Paused'" Then
Collection1.Add(svc("DisplayName"))
End If
Next
D Dim searcher As New ManagementObjectSearcher()
searcher.Scope = New ManagementScope("Win32_service")
For Each svc As ManagementObject In searcher.[Get]()
If DirectCast(svc("State"), String) = "Paused" Then
Collection1.Add(svc("DisplayName"))
End If
Next