Thank you very much for the assistance. I am attempting to let the launcher icon switch to an existing VFP6. How can the launcher app then say VFP6.DoCmd?
>>
>>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://"...