starting a process from a .NET windows service

后端 未结 3 402
遇见更好的自我
遇见更好的自我 2021-01-18 07:41

I am trying to start a console application from a .NET Windows Service. The service is running on a Windows 2008 server.

I use Process.Start to run the console appl

相关标签:
3条回答
  • 2021-01-18 07:57

    Is it possible that the process you are spawning is attempting to prompt the window station for user input? In which case it could hang...

    Which process are you starting? Is it part of the platform/OS (like cmd.exe) or something custom?

    0 讨论(0)
  • 2021-01-18 08:06

    I had exactly this same problem. For me the key was to set StartInfo.UseShellExecute = false;

    0 讨论(0)
  • 2021-01-18 08:18

    After a long time search for a solution for this, I found the wise stones for my problem.

    I made a new WindowsForm based program, with same Process.Start command, and then the standard "Windows Warning Security" dialog box shows up, and thats why it dosent work.

    After turn off "User Access Control" the Windows Service works correctly.

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