2016-05-17 12 views
3

Windowsタスクスケジューラで実行するようにスケジュールされたC#コンソールがあります。スケジューラから実行しようとすると、次のエラーが発生します。C#Console App - この操作にはインタラクティブウィンドウステーションが必要です

この操作では、対話型ウィンドウステーションが必要です。私はその後、外にapp.manifestを取る場合は、タスクスケジューラから罰金発売する

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

:私は気づいた何

は、それが次の呼び出しを行うことができるように、このアプリはapp.manifestを使用していることです。

アプリをクリックしてapp.manifestを実行して実行すると、正常に起動します。 (しかし、タスクスケジューラからではありません)

答えて

2

このエラーに関連するものが見つかりました。 Interactive Window Station Error On Scheduled Tasks

+0

から

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.

私は「最高Prevelegesで実行する」にチェックしているが、それはまだ同じエラーを与えます。 – Arcadian

関連する問題