0

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)?

Scott Smith
  • 3,900
  • 2
  • 31
  • 63

1 Answers1

2

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)

sticky bit
  • 36,626
  • 12
  • 31
  • 42