Quem pode me ajudar nessa fonte quero deixar ela oculpa na makina e quando der kill no processo citado abaixo a bat voltar. como fasso ?
set app1=iexplore.exe
set app2=mspaint.exe
set app3=EXCEL.exe
set app1=iexplore.exe
set app2=mspaint.exe
set app3=EXCEL.exe
- Código:
@ECHO OFF
tasklist |find /i "%app1%" >nul
if "%errorlevel%"=="1" set a1=N
if "%errorlevel%"=="0" set a1=Y
if "%a1%"=="Y" (
taskkill /f /im "%app1%"
)
if "%a1%"=="Y" taskkill /f /im "%app1%" >nul
set app2=mspaint.exe
tasklist |find /i "%app2%" >nul
if "%errorlevel%"=="1" set a2=N
if "%errorlevel%"=="0" set a2=Y
if "%a2%"=="Y" (
taskkill /f /im "%app2%"
)
if "%a2%"=="Y" taskkill /f /im "%app2%" >nul
set app3=EXCEL.exe
tasklist |find /i "%app3%" >nul
if "%errorlevel%"=="1" set a3=N
if "%errorlevel%"=="0" set a3=Y
if "%a3%"=="Y" (
taskkill /f /im "%app3%"
)
if "%a3%"=="Y" taskkill /f /im "%app3%" >nul