Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Making a batch file to run several programs at once, windows 7  (Read 1291 times)

0 Members and 1 Guest are viewing this topic.

eds1275

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2165
  • Last login:July 13, 2025, 01:10:24 pm
  • Rock and Roll!
So here is the issue I am having right now. I have to run some software before I start up another piece of software otherwise they won't talk to each other. The problem is, I always forget and the software has an annoyingly long start time. If I cancel it before it is loaded, I need to reboot my computer otherwise it won't let me start it up. It's a pain.

Here is my batch file:

Quote
@echo off
rem Touchdaw
cd "C:\Program Files (x86)\Tobias Erichsen\rtpMIDI\"
start rtpMIDI.exe
timeout /t 3
rem Protools 11
cd "C:\Program Files\Avid\Pro Tools\ProTools.exe"
start ProTools.exe
exit

Now, the problem is at the location C:\Program Files (x86)\Avid\Pro Tools\ProTools.exe there is Pro Tools 10, an older version of the software I use because there are some things there that I need that they are phasing out. The easy but time consuming thing to do would be to uninstall pro tools 10 and reinstall it into another location, but I figured there's got to be a better way. Is there a way to force a batch file to check out the 64 bit installs?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Making a batch file to run several programs at once, windows 7
« Reply #1 on: May 07, 2014, 03:11:57 pm »
First off put a cd\ before that second cd ..... some versions of windows don't care for switching paths before going back to root. 

Secondly, you don't have any wait commands in there, just a timeout command, which probably isn't what you want. 

You want it more like:

start /wait rtpMIDI.exe

As for the 64bit question, I don't think I understand.  Why can't you call protools 10 after protools 11?  They are in different paths so even if the exe name is the same it shouldn't matter right?

eds1275

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2165
  • Last login:July 13, 2025, 01:10:24 pm
  • Rock and Roll!
Re: Making a batch file to run several programs at once, windows 7
« Reply #2 on: May 07, 2014, 03:27:32 pm »
Hmmmmmmm trying to wrap your head around what you mean by the wait thing... does this look better?


@echo off
rem Touchdaw
cd "C:\Program Files (x86)\Tobias Erichsen\rtpMIDI\"
start rtpMIDI.exe
wait /t 3
rem Protools 11
cd\ cd "C:\Program Files\Avid\Pro Tools\ProTools.exe"
start ProTools.exe
exit

The problem with the 64 bit thing is that pro tools 10 is in the Program Files x86 folder, but in the other Program Files folder is protools 11. Even though I don't specify x86, that's where it goes. I don't want to run pro tools 10 at all in this scenario - just rptmidi and pro tools 11.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Making a batch file to run several programs at once, windows 7
« Reply #3 on: May 07, 2014, 06:49:50 pm »
That's not a problem.  You'll probably want to change the path anyway, in case the application uses relative paths in it's calculations, but you can use start with a path. 

Try this:

@echo off
rem Touchdaw
cd "C:\Program Files (x86)\Tobias Erichsen\rtpMIDI\"
start /wait rtpMIDI.exe
rem Protools 11
cd\
cd "C:\Program Files\Avid\Pro Tools\ProTools.exe"
start /wait "C:\Program Files\Avid\Pro Tools\ProTools.exe"
rem Protools 10
cd\
cd "C:\Program Files(x86)\Avid\Pro Tools\ProTools.exe"
start /wait "C:\Program Files(x86)\Avid\Pro Tools\ProTools.exe"
exit


I think that'll work, although what you might have to do is start cmd.exe with the path to the exe and exe as an argument.  In regards to the /wait command.  It prevents the batch from moving to the next line until whatever you started has been closed, so you may not want that and might want to revert to what you had before as I'm not certain of your application.