如何访问由任务计划程序在特定域用户下运行的Windows应用程序的GUI? [英] How to access GUI of a Windows application run by task scheduler under a specific domain user?

查看:303
本文介绍了如何访问由任务计划程序在特定域用户下运行的Windows应用程序的GUI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在运行Windows Server 2008 R2的服务器上,有一个计划的任务,该任务在特定的域用户下运行Windows应用程序(.Net 4.0),该用户执行一些任务并在列表框中报告其进度,并以双倍弹出的形式单击任务栏右侧的任务栏图标。

On our server running Windows Server 2008 R2 there is a scheduled task that runs a Windows application (.Net 4.0) under a specific domain user that performs some tasks and reports its progress in a listbox on a form that pops up by double clicking on a tray icon (right hand side of the task bar).

我了解,如果我使用与另一用户不同的用户身份登录服务器(只能将远程桌面登录到服务器),则计划任务将在I下运行该应用程序将无法看到该应用程序的任何用户界面,但问题是,即使我使用与计划任务相同的登录名登录远程桌面,也看不到任务栏图标,因此也看不到应用程序用户界面。

I understand that if I logon to the server (I can only remote desktop to the server) with a different user other than the one the scheduled task runs the application under I would not be able to see any user interface of the application but the problem is even if I remote desktop with the same login as that of the scheduled task I cannot see the tray icon and consequently the application user interface.

我想知道此限制来自何处以及如何制作才能看到应用程序UI。

I wonder where this limitation comes from and how I could make is possible to see the application UI. Any idea please?

推荐答案

我看不出这是一个限制,它是系统安全性设计的一部分。

I don't see that this is a limitation, it's part of the security design of the system.

处理这种情况的一种常见方法如下:

One common way to handle such a scenario would be as follows:


  • 将主要任务实现为服务。

  • 实施一个小的UI程序,该程序在通知区域(任务栏)中显示一个图标。

  • UI和通过命名管道,TCP / IP或其他某种通信机制提供的服务。

如果您这样做,那么它很有可能在另一台计算机上运行UI,这听起来可能会让您的生活更轻松。

If you do it this way then it is quite possible to run the UI on a different computer which sounds like it might make life easier for you.

这篇关于如何访问由任务计划程序在特定域用户下运行的Windows应用程序的GUI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆