title: How to check if ping responded or not in a batch file
body: <p>I want to continuously ping a server and see a message box when ever it responds i.e. server is currently down. I want to do it through batch file.</p>
  
  <p>I can show a message box as said here <a href="https://stackoverflow.com/questions/774175/how-can-i-open-a-message-box-in-a-windows-batch-file/774253#774253">Show a popup/message box from a Windows batch file</a></p>
  
  <p>and can ping continuously by </p>
  
  <pre><code>ping &lt;servername&gt; -t
  </code></pre>
  
  <p>But how do I check if it responded or not?</p>