locked
Does all sessions communicate with Session0 by Remote Desktop Services? RRS feed

  • Question

  • OS: Vista~Win10

    Reference: https://blogs.technet.microsoft.com/askperf/2007/07/24/sessions-desktops-and-windows-stations/

    Qestion:

           Session0 is for Services only , then if users(local & remote) want to interactive with Session0 , do they have to do that by Remote Desktop Services?


    Marcus

    Thursday, February 4, 2016 1:54 AM

Answers

  • Please see this  and this. It's complicated :-(

    Basically,

     - If you have a service, it will run in session 0 (which is a "Terminal services session", not a "logon session").

     - Stuff that runs in session 0 does not display UI and does not interact with user directly, and it cannot send WM_.... messages to visible (interactive) programs. Even if you find a workaround, it likely will be foiled in next Windows updates.

    - This does not mean that Terminal Services are somehow related to, er, "normal" services. It is just that no user session, either local, a.k.a. "glass terminal",or remote TS session, will have number 0.  It is just a confusing slang.

    --pa





    • Edited by Pavel A Thursday, February 4, 2016 10:34 PM
    • Proposed as answer by Hart Wang Monday, February 15, 2016 9:19 AM
    • Marked as answer by May Wang - MSFT Wednesday, February 17, 2016 8:16 AM
    Thursday, February 4, 2016 2:29 PM

All replies

  • Applications can also communicate with session 0 services by using IPC methods such as named pipes, RPC etc.
    Thursday, February 4, 2016 2:51 AM
  • Not all communication to session 0 use desktop service. There also has some solutions like

    Use client or server mechanisms such as remote procedure call (RPC) or named pipes to communicate between services and applications.

    Use the WTSSendMessage function to create a simple message box on the user’s desktop.  This allows the service to give the user a notification and request a simple response.

    For more information, please check this link

    https://blogs.technet.microsoft.com/askperf/2007/04/27/application-compatibility-session-0-isolation/

    Thursday, February 4, 2016 9:16 AM
  • Please see this  and this. It's complicated :-(

    Basically,

     - If you have a service, it will run in session 0 (which is a "Terminal services session", not a "logon session").

     - Stuff that runs in session 0 does not display UI and does not interact with user directly, and it cannot send WM_.... messages to visible (interactive) programs. Even if you find a workaround, it likely will be foiled in next Windows updates.

    - This does not mean that Terminal Services are somehow related to, er, "normal" services. It is just that no user session, either local, a.k.a. "glass terminal",or remote TS session, will have number 0.  It is just a confusing slang.

    --pa





    • Edited by Pavel A Thursday, February 4, 2016 10:34 PM
    • Proposed as answer by Hart Wang Monday, February 15, 2016 9:19 AM
    • Marked as answer by May Wang - MSFT Wednesday, February 17, 2016 8:16 AM
    Thursday, February 4, 2016 2:29 PM