FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Application as a service
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Application as a service
Posted: Mon Nov 23, 2015 08: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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Application as a service
Posted: Mon Nov 23, 2015 08: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
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Application as a service
Posted: Mon Nov 23, 2015 09: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
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Application as a service
Posted: Tue Nov 24, 2015 07: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Application as a service
Posted: Tue Nov 24, 2015 08:05 PM
Tim,

Maybe it should not use the GUI.

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

   MsgBeep()

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: Application as a service
Posted: Tue Nov 24, 2015 08:06 PM
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Application as a service
Posted: Tue Nov 24, 2015 09: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

Continue the discussion