|I want to write a very simple batch file to open up programs like firefox or zune/itunes from within another program. I am using a program that organizes movies and it allows me to execute a file from within the program.|
In order to get that to work I had to make batch files like the following:
start /max firefox.exe google.com
This opens firefox to google and works great, except for when firefox is already open. If its already opened it just opens a new instance but never switches out of the program I was originally in.
For itunes or zune it will open them in the background and keep the original program as the active window. If itunes is already opened and I execute the batch file it will then come to the forefront. That batch file is:
start /max zune.exe
Is there a command to tell the opened program to be the active window? Also is there a way to check if an instance is already running and do some sort of command depending?