Check if Remote Desktop is in use

D

Danny

For our business we need to use remote desktop.
We are using a shared account that is always logged on to Windows XP.
Several users knows the password of the logged on user, so they can
connect remotely.
But if a second user wants to connect to the session, using the same
account/password, the first user is kicked of.

Is there a way to check if the session is remotely managed?
 
P

Pegasus \(MVP\)

Danny said:
For our business we need to use remote desktop.
We are using a shared account that is always logged on to Windows XP.
Several users knows the password of the logged on user, so they can
connect remotely.
But if a second user wants to connect to the session, using the same
account/password, the first user is kicked of.

Is there a way to check if the session is remotely managed?

Give each user his own user-ID and password. He will then be
warned that someone else has a live RD session.
 
D

Danny

That's not possible, because the shared account is logged on, and doing
his job on the system (program collecting data)
 
P

Pegasus \(MVP\)

Danny said:
That's not possible, because the shared account is logged on, and doing
his job on the system (program collecting data)

In this case I think you're stuck. Consider using a server rather
than a WinXP workstation so that you can run several RD
sessions concurrently.
 
T

Torgeir Bakken \(MVP\)

Danny said:
For our business we need to use remote desktop.
We are using a shared account that is always logged on to Windows XP.
Several users knows the password of the logged on user, so they can
connect remotely.
But if a second user wants to connect to the session, using the same
account/password, the first user is kicked of.

Is there a way to check if the session is remotely managed?
Hi,

See if the VBScript (.vbs) below works for you.

A prerequisite for the script to work (in it's current version), is
that all computers are domain computers, and that the user account that
runs the script is directly or indirectly (through group membership)
member of the Administrators group on the remote computer.

Alternatively, look into parsing the output from Qwinsta.exe, some
script examples to be found in this Google newsgroup search:

http://groups.google.com/groups?q=Qwinsta.exe+torgeir&start=0&scoring=d


Script start:

'--------------------8<----------------------

'Change the text y10056 to your actual computer name or
'IP address.
strComputer = "y10056" ' Some computer name or IP address here

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set objEnum = objWMIService.execQuery _
("select __relpath from win32_process where caption = 'explorer.exe'")

strTitle = "Logon check"

If objEnum.Count = 0 Then
MsgBox "No one currently logged in to " & strComputer & "." & vbCrLf, _
vbInformation + vbSystemModal, strTitle
Else
For Each objEntry In objEnum
Set outParams = objEntry.ExecMethod_("GetOwner")
MsgBox "User " & outParams.User _
& " is currently logged in on computer " & strComputer & "." _
& vbCrLf, vbInformation + vbSystemModal, strTitle
Next
End If

'--------------------8<----------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top