Starting a Windows service in an interactive session

后端 未结 5 2072
时光说笑
时光说笑 2020-12-05 08:42

A colleague has a batch script program which needs to to run on a Windows Server in console mode, so that it has access to a Windows interactive session. The server is reboo

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-05 09:23

    I recommend going about this another way. You could build another Windows app that communicates via IPC to the Windows Service and that could be what deals with the closed souorce application. But if you must, you can specify an option in the service (you can do this through MMC, registry, etc). Basically, you can see this option by going to Computer Management->Services and Applications->Services->Right click your service->Change account to Local System and check "Allow system to interact with desktop."

    However, again, I recommend choosing another path.

提交回复
热议问题