Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

program as a service

Status
Not open for further replies.

BRADLEY21

Programmer
Sep 19, 2002
35
US
I would like to run my invisible program as a service, does anyone know how I can do that.

Muchas Gracias.
 
You can create a program that has no forms and runs as just a timer-event. When the event fires it can execute a function to check for whatever you need to check for and handle that situation for the user.

You can also create it as windows systray item. This way the user could right mouse click (providing you allow them to do that) and kill the process, run it mannually, etc.

There is a 3rd party control I played with from that is called bbsystray. It's cheap. Less than 10 bucks and provides some VFP samples.



Jim Osieczonek
Delta Business Group, LLC
 
BRADLEY21

As an alternative to you could create a non-interface application and run it as a "scheduled task".

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
BRADLEY21,

instsrv.exe with srvany.exe is a viable option, look them up on the web using a search engine. I tend to use Installshield professional and the NT Service object that it provides for my install set.

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Slighthaze: Does this mean that you have distributed VFP programs to be installed as services?

Have you had any issues with them? (ie. VFP system UI dialog boxes that may be difficult to suppress, etc)

Do you see any benefit to running a VFP program as a service instead of as a normal, yet 'invisible' application, started, say, through ( Start Menu -> Programs -> Startup ) ?
 
Does this mean that you have distributed VFP programs to be installed as services?

Yes, however the service(s) was usually just a small part of a larger application.

Have you had any issues with them?

No, nothing too major. Usually a little more time and hassle than with a normal application.

Do you see any benefit to running a VFP program as a service instead of as a normal, yet 'invisible' application, started, say, through

This truly is the question I believe a developer should be asking themselves before creating a service. There is only one reason that I have ever found for creating a service as opposed to an invisible application called from a registry run key or the startup folder...and it is if you require your application to continue running even when the users are logging off and on (switching users). There may be some other really good reasons, but I have not found them as of yet, and prefer to use an "invisible" application if this is not a requirement. NT Services truly are for that other .01% that an "invisible" application cannot accomplish.



Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Good points: I think your post will answer many peoples questions... I forgot that services ran independantly of the logged on user, which could be essential for some VFP server-side apps.
 
kosta,

i just get an error with the link you posted...what is it that I should be seeing?

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top