I have created an NT Service with D4.02 and am having lots of problems.
I'll try and keep this short but it's a mess so please excuse me if I start
to ramble.
The service is designed to execute some regular tasks, ie, it's a
scheduler. The first task is to run an automation object and call a
method. This happens every 5 minutes. So far this works just fine, no
problems.
The next task is to do an overnight process. Originally I had it excuting
a VBScript using a CreateProcess call to "cscript eod.vbs". Now it manages
to call the script ok and the script executes fine. BUT, in the script I
call some more automation objects on the local machine and one of these is
failing. If I run the script interactively, it works fine. I tried call
the autopmation objects direct from the service and removed the call to the
script. This gave the same result so I know it's nothing to do with the
vbscript.
So, I'm thinking that it something to do with NT security. The error I get
from the failing automation object is 'Invalid File Name' using fiel
fileexists function. So I try to set the service to run as a secific user
(me) instead of using system account. Now when the service loads it can't
find any of the settings in the registry that control the timings.
Another problem, Interbase Guardian wont start if my service is running.
PLEASE HEEEELP!!
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz