Detect a remote desktop connection from a service at logon (W7/32)
===

I know (and it works) that in C#, this property tells me if the current session is a RDP one:

    System.Windows.Forms.SystemInformation.TerminalServerSession

Now, I have a service that receives logon/logoff and lock/unlock events, and I need a way to tell this service if the session being started is rdp or local. 

Problem: the service runs as SYSTEM user, and the property above always returns false (I think because SYSTEM is always considered a local connected user)

I've tried to search in the register for the Volatile Environment subkey to check if there is the subkey that identify the RDP Session Name: this works in lock/unlock handler, but in the logon handler the subkey doesn't exists yet (subkey is created after login completes).

Any idea about how to work around this problem? 

While a wait for the key creation for a limited amount of time works, I would like a less "kludgy" way to do it.  