Starting/running two or more programs using a single batch file
My problem:1. Need to start Wamp server (my lazy ass is using mysql from it)
2. Then need to open a command prompt, point it to a particular directory where my rails project is located and run the command
mongrel_rails start
to start the rails environment.
3. Then finally need to start a browser and point it to local host and the particular port at which the app is listening.
What I did (might be lame):
I have no problem doing the above steps to access the app, but my boss doesn't. All he needed is an icon which when he click would do all the above for him. No problem, right! Because, we have the beautiful batch files that could do the above tasks for us when got clicked. So I started writing a batch file. It goes like this(which I think is self explanatory),
@ECHO OFF
START C:\wamp\wampmanager.exe
start cmd /c "cd c:\project && mongrel_rails start && pause"
cd C:\ProgramFiles(x86)\Google\Chrome\Application
start chrome.exe http://127.0.0.1:3000
sleep1
exit
which I saved as filename.bat on desktop. Double clicked it: problem solved.