title: Network connection - batch file runs and adds my error message at end
body: <p>I'm having an issue when I run a batch file. When the script successfully connects to the internet and runs, the failed message is still coming up. When I intentionally fail the script, I get a "network error 53". How do I check for this? I did not see any information on errorlevels besides:
   "if errorlevel 1 goto failed:" and then create a failed message</p>
  
  <p>Script runs successfully: Error message stills come up after everything runs properly. Meaning..my "failed: " message still occurs.</p>
  
  <p>Network connection fails: ":failed" part runs as it should</p>
  
  <pre><code>@echo off
  cls
  ping XXXXXXX
  @echo off
  net use o: \\XXXXXXXXX
  if errorlevel 1 goto failed:
  @echo on
  ping XXXXXXXXX
  killdisk.exe -XXXXXX -XXXX
  
  :failed
  echo Unable to access the network share. Please confirm your Ethernet connection and try again.
  echo Please press a key to exit or the prompt will exit after 30 seconds.
  PAUSE 30
  echo EXITING
  </code></pre>