Not that I'll ever understand NT but, you're opening PRG
as an input handle, but you analyze the output? Goes to
a well known location? Can you open my.exe, do your business and close it each time? I'd poke around activestate and Dave Roth's site, seems the end service
has to be using a trappable signal; you just need to find
the right one. Finally, can you open my.exe first ("my.exe | perl my.pl") so that my.exe gets the service killed signal
also? Just whistling past the NT-yard ...