Reputation: 111
Windows 10 has the option for multiple desktops. You can easily switch between them with ctrl + win + left or right arrow. We can also start programs at boot by placing them into start up folder.
I want to start a program (that is placed in the startup folder so that it starts when Windows boots, in case this is relevant) on another desktop rather than the main one. How do I do that?
So Windows boots normally on the main desktop, and my program opens on the 2nd desktop, so that the user that logs in does not notice the program running until they switch to that desktop.
NOTE: I am not trying to hide the program from the user, there are different ways to do this so please do not suggest solutions to this problem. I specifically need it to work in this way (2nd desktop).
Upvotes: 2
Views: 972
Reputation: 244951
Raymond Chen suggested in a comment:
You can use
IVirtualDesktopManager::MoveWindowToDesktop
to move a window to a specific desktop.To get the desktop ID, use
IVirtualDesktopManager::GetWindowDesktopId
of a window already on the desktop you want to move to.
Upvotes: 0