Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 893
D.R. Avatar asked Mar 11 '16 14:03

D.R.


1 Answers

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.

like image 63
Fabian Schmied Avatar answered Oct 04 '22 09:10

Fabian Schmied