title: Detect connection lost with network device and stop application
body: <p>I would like to create a batch app which is pinging constantly my network device.
  Once Result changes into not found it should stop a certain application or my internet explorer.</p>
  
  <p>How do I start with this?</p>
  
  <p>I know i can ping my device with ping 192.168.0.1 -t constantly but how to stop the application with the result ?</p>
  
  <p>Thanks in advance,</p>
  
  <p>Regards,
  J</p>