Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 10-20-2015, 01:32 AM   #1
Solid State Member
 
Join Date: Sep 2015
Location: america
Posts: 9
Default I need a bat file to close programs at startup

I need a bat file that closes something running in task manager such as chrome.exe 5 min after start up.
__________________

d9esco is offline   Reply With Quote
Old 10-20-2015, 05:34 AM   #2
Fully Optimized
 
BikerEcho's Avatar
 
Join Date: Feb 2011
Location: Denmark
Posts: 4,013
Default Re: I need a bat file to close programs at startup

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.
__________________
MOBO: Asus Maximus 6 Hero - GPU: Gigabyte GTX 980ti xtreme - CPU: I7-4770K - PSU: Corsair AX760
RAM: Corsair Vantage 2x4GB - SSD: Samsung 840 EVO 512 + LiteOn LCS-256 - Case: NZXT H440
BikerEcho is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 04:44 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0