How to know if a program was ran using run-as or get the username who is the owner of the current session?
not using WTS开发者_如何学JAVA (Terminal Services is not running...)
You may take a look at this CodeProject article. It outlines a .NET solution but as you haven't specified what language/program you are using, if this is not your case, you could see the unmanaged Win32 functions used there.
精彩评论