Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2008 Mar : How to make a service application run a program?
| Subject: | How to make a service application run a program? |
| Posted by: | "Bo Berglund" (bo.berglu..@telia.com) |
| Date: | Thu, 6 Mar 2008 18:56:30 |
I have a service application that schedules data collection on a
remote PC. It also has a function to run an analysis program on the
collected data to evaluate them and create a report.
We start this program using CreateProcess and wait for it to terminate
whereupon we collect the analysis report it creates.
It turns out that when we enable this function there is no data
produced by the application unless someone is logged on to the PC....
The PC itself runs Windows XP Pro SP2.
So with noone logged on there is no data analysis.
But when someone is logged on (for example with RDP) all runs fine.
I had a suspicion that the flag "Allow service to interact with
desktop" (which was not set) could be the culprit, but after setting
this and logging off we have the same bad execution.
The analysis program is a Delphi GUI program, but we have added a flag
so that in the dpr file we can bypass the Application.Run if the flag
is set. It does not help.
Forms are used to host an image where the analysis result is painted
to be saved to a file.
What should we look for in debugging this behaviour????
/BoB