thank you for your responses,
@trev
first I proceed by creating a service but I got a probleme when Copying the service to make 2 Exe
first exe : "hhhdm1.exe" that reads "hhhdm1.json" config file.
2nd exe : "hhhdm2.exe" that reads "hhhdm2.json" config file.
( Note that the "hhhdm2.exe" is a copy of "hhhdm1.exe" ).
the 2 services reads config from json file that containe different infos.
When trying to install the 2nd service after installing succesfully the 1st, An error is displayed saying that the service exists (They have the same name).
So, Is there anyway to bypass this situation without recompiling many times.
I have coded this and it works but I encountred problem when uninstalling
procedure TAmjayDaemonMapper.AmjayDaemonMapperInstall(Sender: TObject);
var
cmname: String;
begin
cmname := ChangeFileExt( ExtractFileName(ParamStr(0)), '' );
DaemonDefs[0].Name := cmname ;
DaemonDefs[0].DisplayName := cmname;
end;
PS: Look at the attachement.
Thanks you.