# Solved: Batch file hanging after starting application



## spiderdan398 (Dec 5, 2008)

I've made a batch file to make starting a game I have backed up as an MDF easier. I hope to make more of these eventually, but I can't even get this one to work. The program first triggers Alcohol 120% to mount the image. Next it triggers A.C.I.D. to cloak my drives. After this I have inserted a pause, so that once I am done with the game I can press any key and unmount and shutdown A.C.I.D.. The program works fine when A.C.I.D. is running before I launch it, but this is usually not the case. When A.C.I.D. is not yet running, the bat hangs after starting A.C.I.D.. It never executes the rest of my code, so I never get the "press any key to continue prompt". My only theory is that the batch file is waiting for feedback from A.C.I.D. that it only gets if it the program was running ahead of time, but this is really just a guess. I suppose I could just create another batch file to start A.C.I.D. and call that file from my original, but there has to be a better way of doing this. Any thoughts?


```
cd C:\Program Files (x86)\Alcohol Soft\Alcohol 120\
AxCmd.exe 1: /M:"D:\Disk Images\Games\CODWAW.mdf"
ACID.exe -c -s
pause
AxCmd.exe 1: /U
ACID.exe -uc -s
ACID.exe -x -s
```


----------



## Squashman (Apr 4, 2003)

you need to use the start command to start your programs.


----------



## spiderdan398 (Dec 5, 2008)

Thank you for the help Squashman! That seems to have worked. I'm afraid I'm somewhat of a newbie to dos commands. This is how I've always started applications lol.


----------



## Squashman (Apr 4, 2003)

Batch is sequential processing. It will not move on to the next step until the previous step has returned an error code. So when you just try to start a program the batch file is waiting for it to return an error code before it moves on to the next step. For all it knows you are using the output from the first program to use in the next program. By using the start cmd, it just starts the program and tells the batch file that it started successfully and moves on.


----------

