Thanks Sergey, I'll try it...
>Tracy,
>
>Try
>
>oShellApp = CreateObject("Shell.Application")
>lcServiceName = "winmgmt"
>? oShellApp.IsServiceRunning(lcServiceName)
>
See also
http://www.berezniker.com/display/VFP/Windows+Service+Status>
>>VFP9, Windows 2000 or Windows XP. Any safe way to determine if WMI service is running before I call something like:
>>
>>
>>loWMIService = GetObject("winmtmts://"+lcComputer+"/root/cimv2"
>>loProcesses = loWMIService.ExecQuery("SELECT * FROM Win32_Process")
>>
>>
>>I am putting it inside of a TRY...ENDTRY but it doesn't prevent the Moniker Cannot Open File error...
>>
>>I am trying to determing if the service is not running, is corrupt, or if the user doesn't have the security permissions necessary to see WMI and run ExecQuery. I would like to verify WMI is running, then check for the rights to run execquery...
>>
>>TIA,
>>
>>Tracy
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"