Posted by Elena on May 11, 2010Hello,
I need to create a service application which can be started X times as a service.
I used the following code:
procedure TMyService.ServiceBeforeInstall(Sender: TService);
if ParamStr(1)='-install' then IHotel := ParamStr(2) else IHotel :=
IHotel := TRIM(AnsiReplaceText(Copy(IHotel,2), ' ', ''));
if Length(IHotel) = 0 then
Showmessage('Hotel name not specified.' + #13 + 'Service can not be
DisplayName := 'Opera IFC8 AliveCheck for ' + IHotel;
Name := 'MyServiceAliveCheckfor' + IHotel;
Problem is that service freeze on startup when I change service name with last line of the above procedure. If I comment last line service works perfectly but then I can install only one service as the second one will have same name then the first one.
Is there anyone who can help please?