thomasmcgeown
Technical User
Hi all,
My "problem" code is:
Set objWMIService = GetObject("winmgmts:"_ & "{impersonationLevel=impersonate}!\\" &_ frmSelect.cmbPCList.List(intCounter)_ & "\root\cimv2"
Set colRunningServices = objWMIService.ExecQuery("Select *_ from Win32_Service where name = '" & txtService & "'"
For Each objService In colRunningServices
If objService.DisplayName = txtService Then
blah
balh blha
End IF
next
can anyone see a problem with this or do i need to look elsewhere? -
Regards
Tom
My "problem" code is:
Set objWMIService = GetObject("winmgmts:"_ & "{impersonationLevel=impersonate}!\\" &_ frmSelect.cmbPCList.List(intCounter)_ & "\root\cimv2"
Set colRunningServices = objWMIService.ExecQuery("Select *_ from Win32_Service where name = '" & txtService & "'"
For Each objService In colRunningServices
If objService.DisplayName = txtService Then
blah
balh blha
End IF
next
can anyone see a problem with this or do i need to look elsewhere? -
Regards
Tom