D.R.
D.R.

Reputation: 21194

Start process on a specific desktop

How to start a Windows process on a specific Windows Desktop?

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.

Our goal is to enable developers running our web test suite in the background - no interfering of the browser window with their work.

Unfortunately, a Google search didn't turn up anyhting :-(

Note: although we're using .NET/C#, we are perfectly happy with a WinAPI call as well.

Upvotes: 6

Views: 2522

Answers (1)

Fabian Schmied
Fabian Schmied

Reputation: 4154

You can use STARTUPINFO.lpDesktop when creating the process via CreateProcess. For an example, see Start process on the other desktop, Python, Windows.

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.

Upvotes: 4

Related Questions