You are not logged in.
Hi ab, could be posible add a Dependences parameter to CheckParameters in mORMotService unit?
// In Definition change this
class procedure CheckParameters(const ExeFileName: TFileName;
const ServiceName,DisplayName,Description: string);
// for this
class procedure CheckParameters(const ExeFileName: TFileName;
const ServiceName,DisplayName,Description,Dependencies: string);
//and In the implementation add de dependences to :TServiceController.Install
...
if param='/install' then
TServiceController.Install(
ServiceName,DisplayName,Description,true,ExeFileName,Dependencies) else
...
If is not posible, how can define dependence of service using CheckParameters?
Last edited by camu72 (2019-05-04 16:23:01)
Offline
I was also looking for this functionality in TServiceController!
MSSQL has to be started before the rest server starts,
So by now I don't see how I could easyly install the Windows service with the TServiceController!
Best regards Kim Granlund
Offline
I use NSSM for a long time as replacement for the "strange" windows service API. It's allow for almost any console app what correctly handle console events to be executed as a service easy (with a dependencies, restarting and so on). Very cool tool IMHO
Offline
Hi Kixemi, I modified the source of MormotService unit like in a first post, and runs OK, puting in Depenedencies parametrer, the name of Firebird Service in my case. The problems will came when Pull or Fetch the mORMot library... i will lose that changes.... but outside of that, works.
Offline
I have added an optional Dependencies information to TServiceController.CheckParameters, but also to TDDDDaemon and TSynDaemon.
Offline
Thanks ab... you really work fast!!!
Offline