Skip to main content
gamedev.net
🔒 Locked

windows batch programmin

Started by denver 3 replies 950+ views
Original Post
denver
denver
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
/ what matters most ishow well you walk through thefire. /
smr
smr
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.exeC:\Progra~1\MSNMes~1\msnmsgr.exeC:\Progra~1\Yahoo!\Messenger\YPager.exe
denver
denver
fixed it with something else

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


thx.. just close the thread
/ what matters most ishow well you walk through thefire. /
ntg1976
ntg1976
try the call command, it has always worked for me.

@echo off
call "C:\Program Files\Winzip\Winzip32.exe"
Nemesis2k2
Nemesis2k2
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.