The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: BigCam on November 01, 2017, 10:53:14 am

Title: .bat file to start demulshooter and rh all game loader
Post by: BigCam on November 01, 2017, 10:53:14 am
hi im running operation ghost through rh all game loader and im trying to write a .bat to start demulshooter then run operation ghost by starting the rh all game loader exe. i can get demulshooter to launch but opg wont launch or its says it cant find it but i copied the path directly from a shortcut to the exe. any help would be greatly appreciated. Thanks  heres what i have in my bat file.

cd C:\Users\ARCADE\Desktop\operation ghost
demulshooter.exe -target=ringwide -rom=og

start "C:\Users\ARCADE\Desktop\operation ghost\Game Loader All RH.exe"
Title: Re: .bat file to start demulshooter and rh all game loader
Post by: lilshawn on November 01, 2017, 01:06:09 pm
a batch file can simply be

Quote
mspaint.exe
notepad.exe
calc.exe

running the batch would load all 3 apps. so,


Code: [Select]
cd C:\Users\ARCADE\Desktop\operation ghost
demulshooter.exe -target=ringwide -rom=og
Game Loader All RH.exe

should be all you need. but i personally would go with:

Code: [Select]
C:\Users\ARCADE\Desktop\operation ghost\demulshooter.exe -target=ringwide -rom=og
C:\Users\ARCADE\Desktop\operation ghost\Game Loader All RH.exe



the only real reason i've found to need to invoke a program with the start command would be if you need to set a program to a specific CPU core affinity or need higher than normal CPU utilization.

Title: Re: .bat file to start demulshooter and rh all game loader
Post by: DrakeTungsten on November 02, 2017, 08:19:45 am
I'm not familiar with any of the software you are using, but this should fix your problem:

When you encase the executable in quotes when using the start command, then you need an empty set of quotes between the start command and the executable. Try this:
Code: [Select]
start "" "C:\Users\ARCADE\Desktop\operation ghost\Game Loader All RH.exe"
Start is used when you need the batch file to immediately continue execution of the batch file, even if the program which was "start"ed keeps running. In lilshawn's example, Notepad will not launch until you exit out of mspaint, and then the calculator will not launch until you exit out of Notepad. If you put a "start" in front of the first two, then all three programs will open immediately. Note that if this is the reason you are using start (I'm sure it has other features, but the return-to-executing-the-batch-file feature is probably why you were told to use it), then the only thing you gain by using "start" in the last line of a batch file is the removal of a DOS window while the program which was started is running.
Title: Re: .bat file to start demulshooter and rh all game loader
Post by: lilshawn on November 02, 2017, 12:01:02 pm
I guess I've just been lucky all the programs i've ever had to batch run returned a proper run/exit status code that dos/windows picked up on to continue on. (or in the event of an error could fork off the batch to run something else.)

I can confirm calc.exe returns a proper run/exit statuses on load, therefore the batch continues as expected... but notepad.exe does not, and hangs up the batch until it is closed for some reason. I haven't checked if it returns different status code that is unsupported or different than expected by "dos" when loaded that could be detected and used to progress the batch, but at this point in time, it's moot.

welp, TIL