ich versuchs mal ob ich den gekillt bekomme.
hier noch der Code mit dem ich den Dienst installiere:
Delphi-Quellcode:
procedure InstallService(ServiceName, DisplayName: PChar; FileName: String);
var
SCManager: SC_HANDLE;
Service: SC_HANDLE;
begin
SCManager := OpenSCManager(nil, nil, SC_MANAGER_ALL_ACCESS);
if SCManager = 0 then Exit;
try
Service := CreateService(SCManager, ServiceName, DisplayName, SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, SERVICE_ERROR_IGNORE, pchar(FileName), nil, nil, nil, nil, nil);
CloseServiceHandle(Service);
ShowMessage('Service erfolgreich installiert.');
finally
CloseServiceHandle(SCManager);
end;
end;