Under windows: launching an external app via system... but not waiting for a response


#1

Hi,
I have an application written in Ruby (it’s actually a windows
service). It needs to launch other applications. The problem I am
having is that when I call system(“args to launch app”) it never
returns, because I guess the app never returns until it is closed.

I want to be able to launch the app and then continue on.
What is the proper way to do this? A thread?


#2

service). It needs to launch other applications. The problem I am
having is that when I call system(“args to launch app”) it never
returns, because I guess the app never returns until it is closed.

you can use the “start” windows command, so from your system call you
would call “start” passing the parameters to start your external
application. If you don’t want to see a shell window, you can pass /B to
the start command

regards,


javier ramírez

…i do ruby on rails development in madrid, spain, at
http://www.aspgems.com
…you can find out more about me on http://formatinternet.wordpress.com
and http://workingwithrails.com/person/5987-javier-ramirez


#3

phil wrote:

Hi,
I have an application written in Ruby (it’s actually a windows
service). It needs to launch other applications. The problem I am
having is that when I call system(“args to launch app”) it never
returns, because I guess the app never returns until it is closed.

Do a
system (“start application.exe args to launch app”)