English Rebel

New Member
Joined
Jun 8, 2013
Messages
6
I have created a batch file to run three programs. However it doesn't run the first two just the last one. Whenever the batch file is running I see a window open and quickly close when each of the first two programs are requested to run. The window is only open for a second so I cannot see what it is but appears to be a standard Windows window that is empty but I can just make out the name of one of the programs in the bar at the top.
For each file I'm adding the line Start "" "the executable file path"
Here's what I used in the batch file:


@echo off
Start "" "the executable file path"
Exit

Any idea why the first two programs won't run as I can double click their .exe files or their shortcuts and they run just fine? Is there a way to see what happened when the batch file ran (a Windows log file perhaps)?
Thanks
Alan
 


Solution
I think I've answered my own question. The two exe files won't run because they need an INI file. The solution is to add a CD line with the folder location and then a START XXX.exe. The third program ran because it doesn't need an INI file.
I think I've answered my own question. The two exe files won't run because they need an INI file. The solution is to add a CD line with the folder location and then a START XXX.exe. The third program ran because it doesn't need an INI file.
 


Solution
ok - for future reference you could use the "PAUSE" command at points where you want to monitor activity - this will execute the batch file as far as the pause commend then wait for a key to be pressed before continuing.
 


Okay thanks I'll remember that for future troubleshooting. I think in my case the program window that briefly appeared would not pause.
 


You can also use start /d <path_here> to specify the path the program should execute in, thus eliminating the need for the CD command. (much cleaner)

Obtained from "start /?"

START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/NODE <NUMA node>] [/AFFINITY <hex affinity mask>] [/WAIT] [/B]
[command/program] [parameters]

path Starting directory.
 


Back
Top