Solved: Simple Batch File Issue

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

jpboyrox

Thread Starter
Joined
Nov 22, 2009
Messages
344
For some reason my batch file will not pass the lines
Code:
"D:\Users\Josh\Desktop\Josh's Documents\Computers\Misc\Common AutoHotkey Shortcuts\PS Create Shadow.ahk"
or
Code:
"C:\Programs\Adobe\Adobe Photoshop CS5\Photoshop.exe"
until these applications are closed. This is completely useless as the whole point of the batch file is to open these programs simultaneously. The whole thing is really simple and I am at a beginner's level to it all. The file is:
Code:
"D:\Users\Josh\Desktop\Josh's Documents\Computers\Misc\Common AutoHotkey Shortcuts\PS Create Shadow.ahk"
"C:\Programs\Adobe\Adobe Photoshop CS5\Photoshop.exe"
close
 
Joined
Jul 6, 2010
Messages
619
You can't do multiple program opening command lines without giving it some help getting over the inherent pause. Here's what I use for starting up multiple programs:

Code:
::Use the following script to open multiple programs from a batch file.
:: Substituting your own desired software path commands.
:: This batch must be located on a PATH location to work properly.
::The START command overcomes the pause that occurs when opening
::programs with a simple command line.
::The double quotes ("") makes it possible to use a command path that
::requires enclosure in quotes without confusing the START command
::and having it treat it as the "title" switch for the command.
::The CHOICE command provides a time delay between commands.
::Delete it if not needed or add higher amount to the number to get more
::seconds delay.  The ÿ character is made by holding alt and keying 0255
::on the numeric keypad, then releasing the alt key.
::XP does not have the CHOICE command but you can get it from an older
::version of Windows or download it from the Internet for free.  Place it in
::the System32 folder.
::
START "" "C:\Program Files\Microsoft Office\Office\WINWORD.EXE"
CHOICE /c:ÿ /t:ÿ,5 /n
START "" "C:\Documents and Settings\Owner\My Documents\Qpw\TIMELINE.WB2"
CHOICE /c:ÿ /t:ÿ,5 /n
START "" "C:\Program Files\Microsoft Works\WksWP.exe"
You can modify that scropt as needed to fit your requirements.
 
Joined
Feb 17, 2006
Messages
1,838
This is the intended behaviour, allowing you to call outside programs or procedures sequentially.

Try adding the START command:
Code:
START "D:\Users\Josh\Desktop\Josh's Documents\Computers\Misc\Common AutoHotkey Shortcuts\PS Create Shadow.ahk"
START "C:\Programs\Adobe\Adobe Photoshop CS5\Photoshop.exe"
Type HELP START at a command line for a list of parameters.
 

jpboyrox

Thread Starter
Joined
Nov 22, 2009
Messages
344
You can't do multiple program opening command lines without giving it some help getting over the inherent pause. Here's what I use for starting up multiple programs:

Code:
::Use the following script to open multiple programs from a batch file.
:: Substituting your own desired software path commands.
:: This batch must be located on a PATH location to work properly.
::The START command overcomes the pause that occurs when opening
::programs with a simple command line.
::The double quotes ("") makes it possible to use a command path that
::requires enclosure in quotes without confusing the START command
::and having it treat it as the "title" switch for the command.
::The CHOICE command provides a time delay between commands.
::Delete it if not needed or add higher amount to the number to get more
::seconds delay.  The ÿ character is made by holding alt and keying 0255
::on the numeric keypad, then releasing the alt key.
::XP does not have the CHOICE command but you can get it from an older
::version of Windows or download it from the Internet for free.  Place it in
::the System32 folder.
::
START "" "C:\Program Files\Microsoft Office\Office\WINWORD.EXE"
CHOICE /c:ÿ /t:ÿ,5 /n
START "" "C:\Documents and Settings\Owner\My Documents\Qpw\TIMELINE.WB2"
CHOICE /c:ÿ /t:ÿ,5 /n
START "" "C:\Program Files\Microsoft Works\WksWP.exe"
You can modify that scropt as needed to fit your requirements.
okay, your way seemed unnecessarily complicated as simply
START "" "C:\Program Files\Microsoft Office\Office\WINWORD.EXE"
on each program worked for me fine. Thanks a lot!
 
Joined
Jul 6, 2010
Messages
619
I agree, the version I posted is more complex but you may yet find use for it upon occasion. It is able to handle some direct access problems that involve file association startups that the simpler version can't handle.

Thanks for the feedback.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top