It is impossible to send the service code, it is part of a complex application that needs installation.Also, it was tested on two machines and on one of them it works as expected.
I made this small tool (wyUpdateWrapper.exe) to test the behaviour:
static int Main(string[] args) { var wyUpdatePath = Path.Combine(Directory.GetCurrentDirectory(), "wyUpdate.exe"); log("Starting " + wyUpdatePath);
var p = Process.Start(wyUpdatePath, "/quickcheck /justcheck /noerr /outputinfo=\"wyUpdate.txt\""); log("wyUpdate.exe started"); p.WaitForExit(); log("wyUpdate.exe exited, ExitCode: " + p.ExitCode.ToString());
return p.ExitCode; }
Then I configured the service to run wyUpdateWrapper.exe instead of wyUpdate every two minutes. When run manually from command line, the log contains
Starting C:\Program Files (x86)\Praetor Systems s.r.o\Praetor Server Alpha\wyUpdate.exewyUpdate.exe startedwyUpdate.exe exited, ExitCode: 2
and wyUpdate.exe is created with the new version info.
However, when run from the service, it contains
Starting c:\Program Files (x86)\Praetor Systems s.r.o\Praetor Server Alpha\wyUpdate.exewyUpdate.exe startedwyUpdate.exe exited, ExitCode: 0
and no wyUpdate.txt is created.
There is nothing much interesting in the service code itself, the wyUpdateWrapper.exe is started every two minutes using Process.Start. The service runs under LocalSystem.
The wyUpdate.exe is version 2.6.18.4
I am sending the client.wyc by email.
Thank you for your help.