Created
July 16, 2021 20:30
-
-
Save AlexLynd/714ef8dc7e2a6f97fab40fe5f6506594 to your computer and use it in GitHub Desktop.
Windows program crasher batch file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
title Task launcher | |
color f0 | |
set list=teams.exe, outlook.exe | |
:l | |
for %%i in (%list%) do ( | |
tasklist /FI "IMAGENAME eq teams.exe" 2>NUL | find /I /N "teams.exe">NUL | |
if "%ERRORLEVEL%"=="0" echo Do not close this window attempting re-launch && timeout 10 && taskkill /F /IM %%i | |
echo Error Launching Task "Microsoft Teams" | |
timeout 2 | |
cls | |
) | |
goto l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment