Alternative to “Allow service to interact with desktop”?

前端 未结 4 1742
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-03 03:22

I have a windows service (C#) installed on a server that launches every 10 minutes an executable file (C#) to process some images from one directory to another. No interacti

4条回答
  •  广开言路
    2020-12-03 03:46

    Is the subprocess just a console application? I've not written Windows Services, but I think perhaps just starting the subprocess without a window would be sufficient. Use the overload of Process.Start that takes a ProcessStartInfo and set ProcessStartInfo.CreateNoWindow to true.

    http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.createnowindow.aspx

提交回复
热议问题