检测远程桌面连接

检测远程桌面连接

本文介绍了检测远程桌面连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

反正是有,在程序中,检测一个程序是从内部的远程桌面会话或者如果程序在.NET 2.0正在运行正常运行所?我正在试图做的是,我创建了一个时钟进度的应用程序,将时钟一人进出和跟踪。但是,这个人,我怀疑,是远程处理成在工作中自己的电脑,从家里,和时钟进出。

Is there anyway, in a program, to detect if a program is being run from inside a remote desktop session or if the program is being run normal in .NET 2.0? What I'm trying to do is, I create a timeclock application which will clock a person in and out and keep track. But this particular person, I suspect, is remoting into their computer at work, from home, and clocking in and out.

任何想法如何,我可以解决这个问题(和带走远程桌面访问不是一个选项)?我的想法是,如果有一种方法来检测远程桌面会话,我就干脆直接到编程'和$ P $这个从远程打卡pvent他们。

Any ideas how I can solve this issue (and taking away remote desktop access is not an option)? My idea is, if there is a way to detect remote desktop sessions, I will simply implement this into the progam and prevent them from clocking in remotely.

推荐答案

据称,

System.Windows.Forms.SystemInformation.TerminalServerSession

将是真正的远程桌面会话(或VNC会话)

will be true for a remote desktop session (or VNC session)

但我会测试它,以确保; - )

but i'd test it to be sure ;-)

这篇关于检测远程桌面连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 08:19