Skip to content

Instantly share code, notes, and snippets.

@bohack
Created October 24, 2018 17:14
Show Gist options
  • Save bohack/be9912af14b64fcf0a256df956400a50 to your computer and use it in GitHub Desktop.
Save bohack/be9912af14b64fcf0a256df956400a50 to your computer and use it in GitHub Desktop.
Example of trapping missing EXEs
@ECHO OFF
REM Bohack
REM 10/8/18
REM Example of trapping missing EXEs
ECHO %ERRORLEVEL%
ECHO.
pslists
IF %ERRORLEVEL% EQU 9009 (COLOR 47 && ECHO. && ECHO ERROR! - Please install PStools from Microsoft. && ECHO.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment