...einen Dienst sofort nach der Installation starten?
Autor: Chris Böhm
{ To automatically start a service after its installation use this code }
procedure TMyService.ServiceAfterInstall(Sender: TService);
var
sm: TServiceManager;
begin
sm := TServiceManager.Create;
try
if sm.Connect then
if sm.OpenServiceConnection(self.name) then
sm.StartService;
finally
sm.Free;
end;
end;
printed from
www.swissdelphicenter.ch
developers knowledge base