C++ question about running 2 aps

Discussion on Coding.
Post Reply
xenx
Member
Posts: 169
Joined: Tue Oct 03, 2006 7:08 am

Post by xenx »

is there a way to tell a program to also run another .exe at the same time?

i have a small webserver ap, that i would quite like to integrate into the helbreath Gateserver or logserver, it would be nice if it would auto run when you run the gateserver/logserver, either unning a .exe.. or running a .bat would work, is that possible? sort of an also run start.bat type line ?
Jensen
Loyal fan
Posts: 300
Joined: Tue Aug 02, 2005 7:40 am
Location: Illinois, USA
Contact:

Post by Jensen »

What?

Code: Select all

#!/bin/sh
./blah.exe &
./program2.exe &
that good?
-><-
xenx
Member
Posts: 169
Joined: Tue Oct 03, 2006 7:08 am

Post by xenx »

err yes if i can figue out where to put that, basically i want the worldserver for HB to also run a start.bat when you run it, that will be in the same folder.
Jensen
Loyal fan
Posts: 300
Joined: Tue Aug 02, 2005 7:40 am
Location: Illinois, USA
Contact:

Post by Jensen »

well, thats about as simple shell script as you can get.

I have cygwin which is a sort of POSIX compliant emulator for windows and you can just run that from in there (for your uses it would be like CMD on steroids i guess)

or if you prefer you can write a short AutoIt Script

Code: Select all

; as i recall its Run("exeutable","folder to start in","misc windows options")
Run ("./start.bat" , "./");
Run ("./server.exe" , "./");
; code not looked at at all, just written off of memory, consult included help if doesnt work
there are other options if you want the code to wait untill excution of say your .bat finishes running, wait a certain ammount of time, or just launch launch like here
-><-
xenx
Member
Posts: 169
Joined: Tue Oct 03, 2006 7:08 am

Post by xenx »

just plain launch launch is what i wanted cheers m8, ill try that later on :)
Post Reply