>
>The service did not respond to the start of cotrol requiest in a timely fashion.
>
>
>The EMPS.exe will run fine if I run it manually, but will not start as a service.
I've never tried creating a service with sc.exe, but in the .NET services I've created you have to return from the startup routine within a certain amount of time otherwise it assumes the service has failed. Generally, I'll start up another thread which does the real work so I can return immediately.
You could probably do something similar in VFP by starting up a timer:
PUBLIC goTimer
goTimer = CREATEOBJECT("tmrStartUp")
DEFINE CLASS tmrStartUp AS Timer
Interval = 250
Enabled = .T.
FUNCTION Timer()
This.Enabled = .F.
* Call your real "main" code here.
ENDFUNC
ENDDEFINE
It's not really multiple threads, but it may still work.