Build Your Own Arcade Controls Forum
Main => Software Forum => Topic started by: Popcorrin on September 27, 2004, 06:18:52 pm
-
I have limited experience writing batch files and I need some advice on how to get one to work like I want it.
What I want to do is be able to start 2 programs via a batch file and the problem that I am running into is that the 1st program starts fine but the 2nd program won't load until I exit out of the 1st program.
Is there anyway around this? Thanks
-
That's how batch files work! Sequential execution of commands just like a person would enter one after another, but automated.
So about the only thing I can think of off hand to do is not use a batch file for the program launching, but make or see if exists, a program that will just let you shell and run other programs, then maybe you can run that, and it will shell to run program 1 and then shell to run program 2, and may do it simultaneously?
I just tried shelling to DOS (Haven't said that in almost a decade) and running CMD (command.com?) to see if I can open a shell that way and still get back to the prompt while it runs..no good... I was at c:\mame and I typed:
cmd /C mame pacman
and it ran the game but sat waiting until I quit mame, then it let me issue another command.
So I think you have to find or write a program to launch multiple things.
-
You won't be able to launch 2 programs simultaniously in a batch file as they are layover from DOS. To run 2 programs at once you need multithreading, and DOS can't do that without some hefty extensions.
-
I thought batch files were async when running external programs from within the batch file..
What are you trying to do? What two programs? Why do you need to do this? There might be a better way...
-
I have limited experience writing batch files and I need some advice on how to get one to work like I want it.
What I want to do is be able to start 2 programs via a batch file and the problem that I am running into is that the 1st program starts fine but the 2nd program won't load until I exit out of the 1st program.
Is there anyway around this? Thanks
Here's a good page with a bunch of DOS batch files, maybe something here will help?
http://esca.atomki.hu/simtel/msdos/batchutl.html (http://esca.atomki.hu/simtel/msdos/batchutl.html)
-
write 2 batch program and shove it in the START folder. ;D
-
I thought batch files were async when running external programs from within the batch file..
What are you trying to do? What two programs? Why do you need to do this? There might be a better way...
Thanks for all the responses. I was wanting to use a batch file as shell that would load mamewah and also powerstrip.
-
maybe a VBScript?
-
How about sticking Powerstrip in the Local Machine/Software/Microsoft/Windows/Current Version/Run section of the registry?
-
How about sticking Powerstrip in the Local Machine/Software/Microsoft/Windows/Current Version/Run section of the registry?
Would it still get loaded even though I'm using mamewah as shell?
-
If you want to start seperate programs from batch files do this;
@echo off
start program1.exe
program2.exe
the built in start program will open another window and execute program1.exe.
"help start" in a command windows gives this help screen, you can use it to start programs with different priorities etc.
Starts a separate window to run a specified program or command.
START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/WAIT] [/B] [command/program]
[parameters]
"title" Title to display in window title bar.
path Starting directory
B Start application without creating a new window. The
application has ^C handling ignored. Unless the applicatio
enables ^C processing, ^Break is the only way to interrupt
the application
I The new environment will be the original environment passe
to the cmd.exe and not the current environment.
MIN Start window minimized
MAX Start window maximized
SEPARATE Start 16-bit Windows program in separate memory space
SHARED Start 16-bit Windows program in shared memory space
LOW Start application in the IDLE priority class
NORMAL Start application in the NORMAL priority class
HIGH Start application in the HIGH priority class
REALTIME Start application in the REALTIME priority class
remember to spice things up use "title" to set the windows title of the command prompt and a nice "color" command in the beginning of the batch to set the background and font color of the command prompt window...
-
Thanks Ries. Looks like I should be able to do what I want with the options you gave me. :)
I was just curious does anyone know if powerstrip would get loaded if I put it in the registry as DougHillman suggested even though I am using mamewah as shell?