Search code examples
c#windows-10windows-servicesremote-desktopterminal-services

Can I rely on Remote Desktop Services service running on Windows 10 x64 (1803 or higher)?


I'm working on a service (C#) that receives session-change notifications (specifically SessionLogon). The only piece of information I get with that notification is SessionId.

The ultimate goal is to check the logon user's profile (local/roaming AppData/MyCorp/MyApp folder) for a particular setting, and perform a task if it's there.

So I need to go from SessionId to something I can map to a user profile, like LogonUserName or SID. There are solutions on SO, but they involve the WTSQuerySessionInformation API, which is documented to fail if Remote Desktop Services isn't running.

On past versions of Windows, some editions didn't include Remote Desktop functionality (usually the 'Home' editions, IIRC).

Does anyone know if I can rely on this service always being there in all editions of Windows 10 x64 (>=1803)?


Solution

  • Documentation says "no".

    Note

    You can use Remote Desktop to connect to Windows 10 Pro and Enterprise, Windows 8.1 and 8 Enterprise and Pro, Windows 7 Professional, Enterprise, and Ultimate, and Windows Server versions newer than Windows Server 2008. You can't connect to computers running a Home edition (like Windows 10 Home).

    (emphasis: me)