2016-05-17 171 views
3

我有一个计划在Windows任务计划程序中执行的C#控制台。当我尝试从调度程序运行它时,计划会给我以下错误:C#控制台应用程序 - 此操作需要交互式窗口站点

此操作需要交互式窗口站。

我注意到的是,这个应用程序使用一个app.manifest,以便它可以进行下面的调用:

System.Diagnostics.Process.Start("CMD.exe", <PARAM to FileZilla Server.exe /reload_config>); 

如果我参加了app.manifest出来,然后,将推出从任务调度的罚款。

如果我离开app.manifest并通过点击应用程序运行它,它会启动罚款。 (但不是来自任务调度程序)

回答

2

发现与此错误有关的东西,希望它有帮助。

The reason why Windows require the tasks to run in interactive mode is because it was suppose to show an elevated prompt prior to running the tasks itself, thanks to UAC. This is also the reason why the error only happens when the scheduled tasks are configured to run with non build-in Administrator account, by default the built-in Administrator account is configured with silent UAC policy.

To enable the silent UAC policy to non built-in Administrator account (account other than Administrator in Administrators group), open up the Properties page for the scheduled tasks, and check the Run with Highest Priveleges checkbox. This will cause the tasks to be executed as elevated a.k.a as Administrator. Case Closed.

Interactive Window Station Error On Scheduled Tasks

+0

我有检查“与最高Preveleges运行”,但它仍然给出了同样的错误。 – Arcadian

相关问题