在特定桌面上启动过程 [英] Start process on a specific desktop
问题描述
如何在特定的Windows桌面上启动Windows进程?
How to start a Windows process on a specific Windows Desktop?
最好,我们正在寻找一种解决方案,该解决方案在Windows 8.1上也受支持,即不依赖Windows 10的新任务视图功能。我知道,仍然无法支持Windows 8.1中不同用户访问的桌面。
Preferably, we are looking for a solution, which is supported on Windows 8.1 as well, i.e. which does not rely on Windows 10's new task view feature. I know, that different desktops are not easily user-accessible in Windows 8.1, still, they are supported.
我们的目标是使开发人员能够在Windows中运行我们的Web测试套件。背景-不会干扰浏览器窗口的工作。
Our goal is to enable developers running our web test suite in the background - no interfering of the browser window with their work.
不幸的是,Google搜索没有出现任何问题:-(
Unfortunately, a Google search didn't turn up anyhting :-(
注意:尽管我们使用的是.NET / C#,但我们也对WinAPI调用感到非常满意。
Note: although we're using .NET/C#, we are perfectly happy with a WinAPI call as well.
推荐答案
您可以使用 CreateProcess 创建流程时>> STARTUPINFO.lpDesktop
有关示例,请参见在另一个桌面(Python,Windows)上启动进程。
You can use STARTUPINFO.lpDesktop
when creating the process via CreateProcess
. For an example, see Start process on the other desktop, Python, Windows.
但是,这需要控制流程的创建。要在其他台式机上运行,您可能必须以某种方式将其修补到网络测试运行程序中(例如 ChromeDriver
)。
However, this requires having control over the process creation. To get a web test suite to run on another desktop, you'll probably have to patch this into your web test runner (e.g., ChromeDriver
) somehow.
这篇关于在特定桌面上启动过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!