是否可以启动远程应用程序并使其在 Windows 中交互式显示?
我确信以前已经有人问过这个问题,但我还没有找到问题或答案。
我有一个自定义选项卡式应用程序,它在每个选项卡上显示来自各种科学仪器的数据。我的用户希望单击一个选项卡,并在单击我的应用程序中的选项卡时让我的应用程序在另一台计算机上启动各种仪器控制器应用程序(或将其带到前台)。
我尝试了很多不同的方法,从编写自己的 C# 应用程序来执行 Process.Start,编写位于远程计算机上的第二个 C# 应用程序并启动适当的应用程序,使用 Sysinternals 的 psexec 等。我可以得到在远程计算机上成功启动的过程,但无论我提供哪个用户的凭据(并且无论用户是否以交互方式登录),GUI 都会丢失。我相信这是 Windows 中的安全增强功能。
查看 Win32_Process MSDN 的 Create() 方法文档揭示了我的怀疑 - 出于安全原因,Win32_Process.Create 方法不能用于远程启动交互式进程。
看来我能做的最好的就是远程访问任务计划程序以在一段时间间隔后启动远程应用程序。我确信这会给我的应用程序带来可怕的用户体验(谁想单击选项卡并等待 30 秒?),因此我避免使用这种方法。
有人可以提出一种可行的方法,或者帮助反驳这样做的可能性吗?
编辑 psexec自己的文档证实了我的观点:不可能。 -x 标志表示“在 Winlogon 桌面上显示 UI(仅限本地系统)”。如果可能的话,我确信 Sysinternals 会让这一切发生。
I am sure this has been asked before, but I have yet to find the question or answer.
I have a custom tabbed application that displays data from various scientific instruments on each tab. My users want to click a tab and have my application start various instrument controller applications (or have it brought to the foreground) on another machine when a tab is clicked in my application.
I've experimented with lots of different approaches, from writing my own C# app to do Process.Start, writing a 2nd C# app that lives on the remote machine and kicks off the appropriate app, using Sysinternals' psexec, etc. I can get the process to start successfully on the remote machine, but the GUI is missing no matter which user's credentials I supply (and regardless of whether a user is logged on interactively.) I believe this is a security enhancement in Windows.
Looking at the Create() method of the Win32_Process MSDN documentation reveals what I suspected - For security reasons the Win32_Process.Create method cannot be used to start an interactive process remotely.
It looks like the best I can do is remotely access Task Scheduler to kick off the remote application after some time interval. I'm sure this would bring a horrible user experience to my app (who wants to click a tab and wait 30 seconds?) so I am avoiding that approach.
Can someone suggest an approach that will work, or help disprove the possibility of doing this?
EDIT psexec's own documentation bears out my contention that it's not possible. The -x flag says "Display the UI on the Winlogon desktop (local system only)." If it were possible I'm sure that Sysinternals would have made it happen.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在远程计算机上有一个正常的交互式进程来侦听命令。然后,您可以向其发送命令来运行适当的进程。您可以这样做:
TCP 端口将成为一个巨大的安全漏洞。根据您的需要尽可能多或尽可能少地保护它。
Have a normal, interactive process on the remote computer that listens for commands. You can then send it a command to run the appropriate process. You might do it like this:
The TCP port will be a gaping security hole. Secure it as much or as little as you need.