I want a batch program, which will check if the process notepad.exe exists.
notepad.exe
if notepad.exe exists, it will end the process
Try this:
@echo off set run= tasklist /fi "imagename eq notepad.exe" | find ":" > nul if errorlevel 1 set run=yes if "%run%"=="yes" echo notepad is running if "%run%"=="" echo notepad is not running pause