I have a C# WInForms client with elevated user rights (=Run As Administrator) and a Windows Service that restarts that client automatically if the user accidently exits the client.
If the client is started by the User, everything works fine. If the client is started by the service (LocalSystem account), it does not work as expected.
The client is supposed to a call a 3rd party executable called gemcom, which in turn calls another executable called rubylink. The call to Gemcom works as expected, the call to rubylink does not -- but only when the client was previously started by the Windows Service.
Case 1: Client is started by User
A) client.exe is running in *John* account
B) gemcom.exe is called (runs in John account)
C) rubylink.exe is called (runs in John account)
--> OK!
Case 2: Client is started by Service
A) client.exe is running in SYSTEM account
B) gemcom.exe is called (runs in SYSTEM account)
C) rubylink.exe cannot be called
--> FAIL!
What's important here is that gemcom (according to the error message) can SEE the rubylink.exe but it can't do anything with it, i.e. it can't communicate with it.
I have no influence on the call from gemcom to rubylink. Those are both coming from the 3rd party vendor. Those two are written in C++ in 1999.
I observe this behavior on both Wind7/8 and XP.
Would anybody know why?