• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

.bat to start programs?

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

tenchi86

Member
Joined
Oct 19, 2004
Location
Smoky Mountains, NC
Ok I was wondering what I would type to make a batch file load programs? Also to stop them. I saw something like to stop them you type TaskKill C:/program file/name and to start you just type start C:/program files/name. Is this correct and if not what is it?
 
i know if u want to start an app u just need to type the name of the exe if the bat is in that same folder, but if it isn't then u need to put the location into quotes

for example
"C:\Program Files\WinRAR\WinRar.exe"

and that would launch winrar and u would see that line in the command promt, if u don't wish to see that line then simply add
@ECHO OFF
at the top line and nothing will be visible in the dos window
if you wish to display something in the window then just type
ECHO message here

so for example
@echo off
echo winrar

"C:\Program Files\WinRAR\WinRar.exe"

the @echo off will hide the command line but the echo will display the message winrar


i dont know how to kill the app with another bat or the same one (maybe with an IF command)

edit: as i recall i think you can delete something that u specify with the prefix DEL
so that would be
DEL app.exe
 
Ok thanks the closing one si not as important. I just wanted a way to if I wanted start like firefox and a few other apps at once esides just system start up files.
 
Any way to make cmd not show up at all? This is what I have typed in.
@ECHO OFF

"C:\Program Files\Trillian\trillian.exe"

"C:\Program Files\Winamp\winamp.exe"

"C:\Program Files\Mozilla Firefox\firefox.exe"

Some reason it only loads trillian. How can I fix this?
 
make shortcuts to the 3 programs and put them on c:\

make a .bat file with the following content and put it onto ur desktop
------------------------------------------------------------------
@ECHO OFF
start trillian
start winamp
start firefox
cls
------------------------------------------------------------------
this is assuming that u name the shortcuts trillian, winamp, and firefox

if u want firefox to start on a diff page than ur default then write this instead of the firefox line for example

start firefox http://www.google.com

u can put anything instead google but u have to include the http:// or it wont know how to open it
 
Ok thanks. I had them in start up folder already just thought a batch file would be cool. So now I have one to shut off my pc stop folding and run my fav apps these things are handy.
 
To end a program just type

taskkill /f programName.ext

you can also do it to computers over a network by doing:

taskkill /s computerName /f programName.ext
 
tenchi86 said:
Also to stop them.

If you are interested...here is a great .bat file to startup when you do a fresh boot for benchmarks...

net stop "Alerter"
net stop "COM+ Event System"
net stop "Distributed Link Tracking Client"
net stop "Distributed Transaction Coordinator"
net stop "Fax Service"
net stop "Logical Disk Manager"
net stop "IPSEC Policy Agent"
net stop "Print Spooler"
net stop "Protected Storage"
net stop "Messenger"
net stop "Remote Registry Service"
net stop "Server"
net stop "Telephony"
net stop "System Event Notification"
net stop "RunAs Service"
net stop "TCP/IP NetBIOS Helper Service"
net stop "Upload Manager"
net stop "Windows Installer"
net stop "Windows Management Instrumentation"
net stop "Computer Browser"
net stop "Workstation"
net stop "System Event Notification"
net stop "Removable Storage"
net stop "DHCP Client"
net stop "DNS Client"
net stop "Network Connections"


For those that do not know:

Copy and paste those instructions as typed into a notepad file...save the file as startup.bat

Put the Startup Bat into your startup folder everytime you restart for bench runs...

This will stop all internet connection until you remove the .bat file from the startup folder and reboot

This .bat file can give you a extra 50 to 100 marks in 3d marks 01 and other memory/cpu intense benchmarks...
 
Anyway to have one batch file that will start and stop the programs? Right now I have a batch file to kill my spyware/IM apps and a second batch file to start them again. I shut them off when I am gaming. What I want to have is one batch file that will start them the first time I use it, and stop them the next time.
 
Back