Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- CommandYouWillRun.exe
- rem waiting for the process to start
- :startcmd
- sleep 1
- c:pathtopslist.exe CommandYouWillRun > NUL
- IF ERRORLEVEL 1 goto startcmd
- rem the process has now started
- :waitforcmd
- sleep 1
- c:pathtopslist.exe CommandYouWillRun > NUL
- IF ERRORLEVEL 1 got finished
- goto waitforcmd
- :finished
- echo "This is an error message"
Add Comment
Please, Sign In to add comment