System.Diagnostics.Process.Start() cannot start process when called from Windows service

后端 未结 4 1666
迷失自我
迷失自我 2021-01-06 08:56

I am trying to start an external process from a .NET Windows service. In the past I have used the Process.Start() overload that takes the executable path and a

相关标签:
4条回答
  • 2021-01-06 09:14

    This is just a shot in the dark, but perhaps you can try to run the Windows Service in Interactive mode. If that works, though, this can't be done in Windows Vista (because of Session 0 Isolation).

    0 讨论(0)
  • 2021-01-06 09:22

    Maybe the user has to have, "logon as a service" security right. This is done with the "local security policy" application. And/or "logon as a batch job".

    0 讨论(0)
  • 2021-01-06 09:22

    Use Filemon and see if it is trying to open a config file and not finding it. I once had this error due to a malformed config.

    0 讨论(0)
  • 2021-01-06 09:27

    This is very similar to this question here. The answer is usually due to security issues with the desktop and window station in which the process is being run. See this article for an explanation and some sample code.

    0 讨论(0)
提交回复
热议问题