Connecting Tech Pros Worldwide Forums | Help | Site Map

exec in background on Windows

Alan Walkington
Guest
 
Posts: n/a
#1: Jul 16 '05
Folks:

How can I get an /exec'ed/ process to run in the background on an XP box?

I have a monitor-like process which I am starting as
'exec("something.exe");' and, of course the exec function blocks until
something.exe terminates. Just what I /don't/ want. (Wouldn't an & be
nice here! Sigh)

I need something.exe to disconnect and run in the background while I
continue on with my script.

Any help appreciated.
Thanks,

Alan Walkington
United Defense
San Jose, CA



Bent Stigsen
Guest
 
Posts: n/a
#2: Jul 16 '05

re: exec in background on Windows


Alan Walkington wrote:
[color=blue]
> Folks:
>
> How can I get an /exec'ed/ process to run in the background on an XP box?
>
> I have a monitor-like process which I am starting as
> 'exec("something.exe");' and, of course the exec function blocks until
> something.exe terminates. Just what I /don't/ want. (Wouldn't an & be
> nice here! Sigh)
>
> I need something.exe to disconnect and run in the background while I
> continue on with my script.[/color]

you could install your program as a service, and then do a net start/stop.

there was a service-wrapper for NT, but for XP??

/Bent
Alan Walkington
Guest
 
Posts: n/a
#3: Jul 16 '05

re: exec in background on Windows


"Bent Stigsen" <.@thevoid.dk> wrote in message
news:3eff074c$0$13205$edfadb0f@dread15.news.tele.d k...[color=blue]
> Alan Walkington wrote:
>[color=green]
> > Folks:
> >
> > How can I get an /exec'ed/ process to run in the background on an XP[/color][/color]
box?[color=blue][color=green]
> >[/color][/color]
<snip>
[color=blue][color=green]
> > I need something.exe to disconnect and run in the background while I
> > continue on with my script.[/color]
>
> you could install your program as a service, and then do a net start/stop.
>
> there was a service-wrapper for NT, but for XP??
>
> /Bent[/color]
I think that was a Java service wrapper, not PHP.
Surely there is a way to start a process in Windows without having to
babysit it!

Alan


Jason Dumler
Guest
 
Posts: n/a
#4: Jul 16 '05

re: exec in background on Windows


Alan,

You could also run a vb script file to do what you're looking for. You
can have the script execute the file and not wait for the process to
exit. Then the vb script exits, but your process keeps running.

You could probably use the vb script to do some sort of service wrapper,
or a service start/stop for you (if you install the program as a service).

Jason.

Bent Stigsen wrote:[color=blue]
> Alan Walkington wrote:
>
>[color=green]
>>Folks:
>>
>>How can I get an /exec'ed/ process to run in the background on an XP box?
>>
>>I have a monitor-like process which I am starting as
>>'exec("something.exe");' and, of course the exec function blocks until
>>something.exe terminates. Just what I /don't/ want. (Wouldn't an & be
>>nice here! Sigh)
>>
>>I need something.exe to disconnect and run in the background while I
>>continue on with my script.[/color]
>
>
> you could install your program as a service, and then do a net start/stop.
>
> there was a service-wrapper for NT, but for XP??
>
> /Bent[/color]

Derek O'Harrow
Guest
 
Posts: n/a
#5: Jul 16 '05

re: exec in background on Windows


Have you tried exec'ing "start something.exe" ? That would start it as a
seperate process.??

"Alan Walkington" <alan[REMOVE]@walkington.net> wrote in message
news:UfxLa.2951546$CK1.442688@news.easynews.com...[color=blue]
> Folks:
>
> How can I get an /exec'ed/ process to run in the background on an XP box?
>
> I have a monitor-like process which I am starting as
> 'exec("something.exe");' and, of course the exec function blocks until
> something.exe terminates. Just what I /don't/ want. (Wouldn't an & be
> nice here! Sigh)
>
> I need something.exe to disconnect and run in the background while I
> continue on with my script.
>
> Any help appreciated.
> Thanks,
>
> Alan Walkington
> United Defense
> San Jose, CA
>
>[/color]


Closed Thread