How to bring one application from default desktop to custom desktop?

Jyothi R 6 Reputation points
2021-12-13T08:27:53.577+00:00

Is there any way to bring one application from default desktop to custom desktop?

For example, CredentialUIBroker.exe(microsoft service) is always appear in default desktop(Winsta0\default).

I want to make this to appear in programmatically created new desktop.

Can you suggest a solution for this?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,560 questions
{count} votes

1 answer

Sort by: Most helpful
  1. RLWA32 40,021 Reputation points
    2021-12-30T10:06:08.877+00:00

    In my Windows 10 21H1 system CredentialUIBroker.exe is identified as a local server under several AppID keys the registry (64-bit and 32-bit). You can also see it using the component services tool in DCOM config.

    One of the registry values that appears under several of the AppID keys is for a value named AppIDFlags. According to https://learn.microsoft.com/en-us/windows/win32/com/appidflags "If the APPIDREGFLAGS_ACTIVATE_IUSERVER_INDESKTOP flag is set in the AppIDFlags value, COM will either bind to, or launch and bind to, the server process running in the client's desktop and the session in the activation request. For example, if the client is running "winsta0\desktop1" in session 3, the activation request for session 3 will either bind to, or launch and bind to, the COM server in "winsta0\desktop1" in session 3, even if an instance of the COM server is already running in "winsta0\default" in session 3."

    I'm guessing that this flag might be the answer to the wrong desktop issue. However, I have not tested it and cannot advise exactly which of the several AppID keys for CredentialUIBroker.exe is applicable in your circumstance. Should you choose to modify the registry to set this flag I strongly suggest testing thoroughly (a virtual machine would be helpful) and with appropriate backups available.