Windows Daemon with params lazarus / 34-Windows ---------------------------------------------------------------------- Beppeoioi · 2018-08-27 07:36 Good morning to all of you it's the first time I write in this forum, if I'm wrong I beg you to forgive me. I'm writing a service for Windows using a TDaemon. I would like to be able to perform the service installation by specifying a file path ( or two) as a parameter. How can I do ? I tried to look for documentation, but I did not find anything. Sorry if my English is not perfect. Thank you all ---------------------------------------------------------------------- Handoko · 2018-08-27 07:52 Hello Beppeoioi, Welcome to the forum. I don' know much about daemons and services but I found these info, which I think may be useful for you: http://wiki.lazarus.freepascal.org/ServiceManager http://wiki.freepascal.org/Daemons_and_Services https://www.freepascal.org/docs-html/fcl/daemonapp/tdaemondef.html ---------------------------------------------------------------------- Beppeoioi · 2018-08-27 08:03 Hi Handoko, thanks for the reply. I have already read the links you have posted to me but I have not found answers to my question. I created a watchdog service. He monitors the presence of a process in memory and when he does not find it, he launches the executable. I manually entered the path of the executable in the code, but I would like to be able to indicate which process to monitor through a parameter to the installation of the service. Is there anyone who has any ideas? Thanks again ---------------------------------------------------------------------- ASerge · 2018-08-27 18:20 Quote from: Beppeoioi on August 27, 2018, 10:03:27 am... I manually entered the path of the executable in the code, but I would like to be able to indicate which process to monitor through a parameter to the installation of the service. Is there anyone who has any ideas? StartService has lpServiceArgVectors parameter. You can pass params through "sc start MyService Param1 Param2", or "net start MyService /Param1 /Param2" or through GUI "Start parameters" box.