in reply to Monitoring a process

Hello,

  • Use Win32::Service::GetStatus to check state.

  • Compare to known runing value and do something if needed.

  • Sleep for sometime or re-schedule with AT .

    Here's how i check state :

    Win32::Service::GetStatus( $server, $service_name, \%ServHash ) if ( $ServHash{CurrentState} != 4 ) { It_s_not_runing_do_something() } ;

    Sometimes it's not enough to GetStatus, for example if you're trying to monitor something that is launched by a running service. In that case you may have to check for the value of a key in the registry. This is done with Win32::TieRegistry.

    ZlR