Sign in to follow this  

windows batch programmin

This topic is 4711 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey Guys, Simple question. Im trying to make a batch file to start my 3 IMs at once:
START "c:\Program Files\AIM\aim.exe"
START "C:\Program Files\MSN Messenger\msnmsgr.exe"
START "C:\Program Files\Yahoo!\Messenger\YPager.exe"
but it just opens 3 windows command windows. Anyonet ell me how to do this? Thanks

Share this post


Link to post
Share on other sites
Why "START?"

In a batch file, you just need one command per line. To start programs, you don't need any sort of keyword. Just type the name of the program you want to run.


c:\Progra~1\AIM\aim.exe
C:\Progra~1\MSNMes~1\msnmsgr.exe
C:\Progra~1\Yahoo!\Messenger\YPager.exe


Share this post


Link to post
Share on other sites
fixed it with something else

cd "c:\Program Files\AIM\"
start aim.exe
cd "C:\Program Files\MSN Messenger\"
start msnmsgr.exe
cd "C:\Program Files\Yahoo!\Messenger\"
start YPager.exe


thx.. just close the thread

Share this post


Link to post
Share on other sites
You don't need "call" or "start". Call is useful when you want to execute batch files from within batch files. If you try and execute a batch file from within a batch file the way you'd execute a program, the script terminates when the other batch file you called reaches the end. Call means it'll execute, but when it finishes, control will pass back to the script that called it, similar to a function call in programming. Just executing a batch script normally is more akin to a goto statement. Start is mostly useful for its flags. You can use start to wait around in a script until the program you call terminates, rather than just ask it to open.

In general, if you want to execute a program through a batch script, it's the same as opening it through the command prompt. Just enter the name of the program, as smr said.

Share this post


Link to post
Share on other sites

This topic is 4711 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this