I need a bat file to close programs at startup

d9esco

Solid State Member
Messages
9
Location
america
I need a bat file that closes something running in task manager such as chrome.exe 5 min after start up.
 

BikerEcho

Fully Optimized
Messages
4,029
Location
Denmark
Code:
if not "%minimized%"=="" goto :minimized
set minimized=true
start /min cmd /C "%~dpnx0"
goto :EOF
:minimized

ping localhost -n 300 > nul

taskkill ProgramTaskNameHere.exe

Save as SomeName.bat and put it into your startup folder. That will make it start up automatically when the computer logs in.

Is this working out for ya?

The ping localhost 300 command it for the batch file to wait 300 seconds (5 minutes)
and all the above code is for the command prompt to minimize automatically.
If you don't want it to do that, remove it.
 
Last edited:
Top