>>>>>>
>>>>>>What is objwmiservice = Getobject("winmgmts:\\.\root\"+m.wmiclass)? I get Moniker cannot open file.
>>>>>
>>>>>Marco's program won't run in VFP6.
>>>>>
>>>>>You can call the class directly, then (with a little twist needed, don't ask me why...).
>>>>>
>>>>>
>>>>>LOCAL Processes
>>>>>LOCAL Process
>>>>>LOCAL WMIQuery
>>>>>LOCAL WMIService
>>>>>
>>>>>m.WMIService = GETOBJECT("winmgmts://.\root\cimv2")
>>>>>
>>>>>m.WMIQuery = "SELECT * FROM Win32_Process"
>>>>>m.Processes = m.WMIService.ExecQuery(m.WMIQuery, , 32)
>>>>>
>>>>>FOR EACH m.Process IN m.Processes
>>>>>
>>>>> IF m.Process.Name == "VFP6.EXE"
>>>>> ? "VFP6 is running at", m.Process.ExecutablePath
>>>>> EXIT
>>>>> ENDIF
>>>>>
>>>>>ENDFOR
>>>>>
>>>>>
>>>>>PS - thinking about it again, it may seem more strange that "winmgmts:\\" is working, instead of ""winmgmts://"...
>>>>
>>>>Hello Antonio -thanks for the appreciation!-
>>>>I always use ( and highly recommend ) MS WMI code creator (
https://www.microsoft.com/en-us/download/details.aspx?id=8572 )
>>>>to inspect what's available on wmi classes.. ( see attached image ) All this time I've used backslash as they do -
>>>>Now I see VFP9 works both ways ( using slash / backslash ) so I'll do the update -
>>>>
>>>>Thanks.
>>>>
>>>>Update:
>>>>Now I remember that VFP6 has no empty object - so vfp6 users would have to change "empty" for "line" .
>>>
>>>Could you not use a compile directive?
>>
>>Sadly I'm unable to test it for VFP6..
>
>I will test for you.
I just shared the modified source as response to Antonio.
( wmi object properties with colliding names will change to property+'_' )
@nfoxdev
github.com/nfoxdev