title: What caused ping.exe to return the error "application was unable to start correctly"? (0x000007b & Others)
body: <p>I wrote a batch script to recursively (without using a FOR loop; as a precaution) ping all addresses from 0.0.0.0 to 255.255.255.255</p>
  
  <p>While running this script, it worked beautifully until ~0.0.94.100 (it's written so as to show the current address being pinged)</p>
  
  <p>When I received the error 'Application was unable to start correctly, click OK to close it' it hung on the display of '0.0.94.100' until I clicked 'OK'; then resumed (and repeated the error for several other addresses after that) it should be noted that the error wasn't received by two consecutive addresses (yet; I stopped after I was forced to reboot my computer (completely froze)) (e.g. 0.0.94.100 caused an error, 0.0.94.101 did not, etc)</p>
  
  <p>Every few error messages, the 0x000007b part of the error (memory address? pointer?) would change. After approx. 5-10 errors of that nature, I received an error something to the effect of 'the referenced memory could not be...' shortly after, my display driver crashed. After the driver restarted, and I continued to run the script out of curiosity, the driver continued to crash and the 'was unable to start...' continued to persistently pop up.</p>
  
  <p>I've included the script's code at the bottom; is the problem arising from essentially spamming PING.EXE? Is it from trying to ping the addresses 0.X.X.X or is it another problem entirely? Any input would help. As for the purpose of the script, it's meant to be a router IP locator in case I forget the IP address (most of my router's stickers have been removed and, unfortunately, lost). I have an earlier version of this script that only went from 192.168.0.0 to 192.168.255.255 however, I now know that 4 of my routers do not use addresses within that range.</p>
  
  <pre><code>@ECHO OFF
  SETLOCAL EnableDelayedExpansion
  TITLE GateWay BFF
  SET N1=192
  SET N2=168
  SET N3=0
  SET N4=0
  SET MFILE="!APPDATA!\..\LocalLow\ShadowCorp\GateWay BFF Results.txt"
  SET FOUNDIPS=0
  ECHO Results For GateWay BFF - !DATE! !TIME! &gt;!MFILE!
  ECHO Results For GateWay BFF - !DATE! !TIME!
  GOTO START
  
  :START
  IF /I !N4! GTR 255 (
      SET /A N3 += 1
      SET N4=0
      IF /I !N3! GTR 255 (
          SET /A N2 += 1
          SET N3=0
          IF /I !N2! GTR 255 (
              SET /A N1 += 1
              SET N2=0
          )
      )
  )
  SET IPK=!N1!.!N2!.!N3!.!N4!
  CLS
  ECHO Pinging... ^(!IPK!^) ^(!FOUNDIPS!^)
  PING -n 1 -w 100 !IPK! 1&gt;NUL 2&gt;NUL
  IF /I !ERRORLEVEL! EQU 0 (
      SET /A FOUNDIPS += 1
      ECHO !IPK! &gt;&gt;!MFILE!
  )
  IF /I !N4! EQU 255 (
      IF /I !N3! EQU 255 (
          IF /I !N2! EQU 255 (
              IF /I !N1! EQU 255 (
                  ECHO.
                  ECHO DONE
                  GOTO END
              )
          )
      )
  )
  SET /A N4 += 1
  GOTO START
  
  :END
  TIMEOUT /T 3 &gt;NUL
  EXIT
  </code></pre>
  
  <p>It should also be noted that after a few crashes (display driver), some glitched graphics appeared on the screen. Though I'm certain it's not very relevant, just thought I'd include it as a precaution to what this script can do...</p>
  
  <p>DO NOT RUN THE SCRIPT</p>
  
  <p>It may cause temporary, serious or even irreparable damage to your computer and/or its components.</p>
  
  <p>RUN AT YOUR OWN RISK</p>
  
  <p>Computer Details</p>
  
  <pre><code>    Make: HP Pavilion 23 AIO
      OS: Windows 10 Home (Version 1709)
      OS Build: 16299.309
      Bit-depth: 64-bit
      RAM: 4GB
      Processor: Intel Core i5-4690T @ 2.5 GHz
  </code></pre>
  
  <p>I understand this error "unable to start correctly..." can be because of the MS upgrade to Windows 10, which this computer has been upgraded (from either Windows 8 or 8.1, can't recall anymore specifics at the moment). However, I have never received that error (usually caused by faulty DLLs after the upgrade, at least as far as I read) before until running the script.</p>
  
  <p>Note: No internet connection was used in the testing of this script.</p>
  
  <p>Link to article on 'application could not start correctly'
  <a href="https://superuser.com/questions/610495/the-application-was-unable-to-start-correctly-0xc0000018-windows-8-x64">https://superuser.com/questions/610495/the-application-was-unable-to-start-correctly-0xc0000018-windows-8-x64</a>)</p>