troubleshooting Question

Detect active RDP session in a bunch of winxp domain pc's

Avatar of Non Linearly
Non LinearlyFlag for Greece asked on
JavaASPWindows XPRemote AccessWindows Server 2008
29 Comments1 Solution83 ViewsLast Modified:
We have 20 Winxp pc's in a corporate domain. We need to make an application preferred as desktop java (or using vbscript inside classic asp, or vb6, or as a batch script) that will show us which of those have active RDP sessions (or better which of those are in use locally or remotely). Serching I found a simiral case in this solved EE question Java Detect Remote Users. But the accepted answer, for a reason that I couldn't understand, has nothing to do with the core of the question and doesn't solve it because PsLoggedOn has nothing to do with RDP connections/disconnections and still shows the RDP logged on user as active even if terminates the RDP session.
Another option is to check the RDP port 3389 if is in use. It is very simple through Java with Socket and there are many examples in the Web. But this is not what we need cause it doesn't show us if there is a connection to that port but if a port is bounded by an application for use. In this case every time we check the remote pc will responds with True even if there is not an RDP connection.
Continuing we test other Windows command line utilities like "qwinsta" to query the remote pc for sessions (locale or remote). But pc's responds with "access denied".  We search and we find that have to change a registry value "AllowRemoreRPC" that we couldn't find anywhere in the registry of the remote pc.
A very good option would be a small application installed and running on each of the 20 pc's that could catch RDP connections and disconnections and update a network database.

Non Linearly

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 29 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 29 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros