I can get the below code to enumerate my services OK, but I am getting no IntelliSense in my .prg if I type "? oService.".
Is there a trick to getting IntelliSense to work with GetObject and collections, or is it just that WMI is a biotch?
cHost = "."
oWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" + cHost + "\root\cimv2")
colServiceList = oWMI.ExecQuery("Select * from Win32_Service")
For Each oService in colServiceList
? oService.Name
Next