if( ServiceRunning(
  '\\ComputerName',
  'alerter' ) )then
begin
  // "alerter" service on \\ComputerName
  // is running
  // take appropriate action here
end;

if( ServiceRunning(
  '',
  'alerter' ) )then
begin
  // "alerter" service on the
  // local computer is running
end;

if( ServiceStopped(
  '',
  'alerter' ) )then
begin
  // "alerter" service on the
  // local computer is in the
  // "stopped" state (not running)
end;