batch file to run programs

danj

New Member
Hi there,

I have a question about creating a batch file.

I did some research on writing batch files but I still can't seem to figure out what I need to do. What I want is a batch file that, when executed, will run two separate executable files (start two programs)

The two programs are Avast and Kerio firewall - I rarely go online with this computer, so I'd like a quick way to start these guys up when I do go online.

From what I've read, this is all I can come up with:

@echo off
start "kerio" C:\Program Files\Sunbelt Software\Personal Firewall\kpf4ss.exe

@echo off
start "avast" C:\Program Files\Alwil Software\Avast4\ashDisp.exe

any help would be appreciated,

-dan
 
Yeah that looks about right, put that text into wordpad and save it out as "avast.bat" for example.
 
well you may need to look into a scripting program, because batching is usually used for installs, and if you need these to run, you can do so from the GUI.

Windows is not a batch friendly OS when it comes to using it, only when install/deploying it really.

Not to mention you can flag those apps to run at start up via msconfig > startup


What is it exactly you are trying to accomplish?
 
I disabled them from msconfig because I didn't want them starting up and running in the background when I'm not connected to the internet with this specific computer. I use it for some pretty cpu intensive software and I don't want anything I'm not using running in the background

So I want to be able to launch both programs with one batch file

When I try to run the file I posted above it says "windows cannot find 'C\Program'" twice.
 
I disabled them from msconfig because I didn't want them starting up and running in the background when I'm not connected to the internet with this specific computer. I use it for some pretty cpu intensive software and I don't want anything I'm not using running in the background

So I want to be able to launch both programs with one batch file

When I try to run the file I posted above it says "windows cannot find 'C\Program'" twice.

You need double quotes around the path because there is a space...

I.E. start "C:\Program Files\Sunbelt Software\Personal Firewall\kpf4ss.exe"
 
great - it works now

One more question.. How can I set it up so that I can type the title of this batch file into the run box and have it run the batch?
 
Save it in a location that is in your PATH variable or add where you saved it to the PATH. Look up the set command in a command prompt if you don't know how to. You can set the PATH from system properties as well in the environment variables section on the advanced tab.
 
Back
Top