Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select just one service from Win32_service...

Status
Not open for further replies.

thomasmcgeown

Technical User
Feb 6, 2002
27
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top