I wrote a small service that basically just writes some text into a .txt file which it just doesnt do. I tested it without the service and writing the file works.
procedure TMyService.ServiceExecute(Sender: TService);
const
SecBetweenRuns = 10;
var
Count: Integer;
begin
Count := 0;
MyFileWriter:= TMyFileWriter.Create;
while not Terminated do
begin
Inc(Count);
if Count >= SecBetweenRuns then
begin
Count := 0;
//Here i just try to write a .txt file
MyFileWriter.WriteFile();
end;
Sleep(1000);
ServiceThread.ProcessRequests(False);
end;
end;
Do i need special rights for the service?