Application as a service

Application as a service

Postby TimStone » Mon Nov 23, 2015 8:23 pm

I have a program that I run on a server that provides automatic updates and completes other tasks. Until now it has been installing in the Startup menu and has worked out fairly well. However on some servers it won't activate on a reboot unless there is an operator to authorize it.

The IT guys tell me it needs to be a "service". I'm using an installer that will let me create a service from an .exe, though it is not currently correctly activating the program.

So here is my question, for discussion. Is anyone else creating a FWH / xHarbour or Harbour, executable to run as a service ? If so, what guidelines are you following ?

Thanks for the info and ideas any can share on this topic.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Application as a service

Postby cnavarro » Mon Nov 23, 2015 8:52 pm

Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Application as a service

Postby TimStone » Mon Nov 23, 2015 9:17 pm

I already read that thread. It describes how to install it, but I'm using Actual Installer and may be able to do the installation right in my setup program.

My question was about the actual service .exe built with FWH. Has anyone done this and discovered issues we need to consider in the process of building the .exe.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Application as a service

Postby TimStone » Tue Nov 24, 2015 7:02 pm

I will try this again:

1) My installation software can actually register an application as a service. It installs it correctly.
2) The application written with FWH and xHarbour, which used to be run with Startup in Windows, will not start as a service even when installed and showing on the services list.

My question:

Should a service NOT be a Windows program ? Should it be built as a console app ? If I do build it as a Windows program, what do I need to avoid ? Can we have it display on the Task Bar as it did when run in the Startup folder ? Can we interact with it ( ie. popup menu ).

Thanks.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Application as a service

Postby Antonio Linares » Tue Nov 24, 2015 8:05 pm

Tim,

Maybe it should not use the GUI.

Please try this example and check if it beeps
Code: Select all  Expand view
function Main()

   MsgBeep()

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42077
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Application as a service

Postby Gale FORd » Tue Nov 24, 2015 8:06 pm

Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: Application as a service

Postby TimStone » Tue Nov 24, 2015 9:25 pm

It would appear Robb has experience with this. I asked in the other thread if he can provide the sample he mentioned. I seem to have a problem getting harbour contribs ...

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 60 guests