Hi,
I am looking for a way of checking or detecting whether the user is currently connected via RDP / MSTSC.
I think I'm half-way there as I can use the ENVIRON$("SESSIONNAME") variable to get either "CONSOLE" or "RDP*". If that variable is "RDP*" then this gives me half of what I need.
However, that variable doesn't tell me whether the user is currently connected and actively viewing the RDP session at that point in time. If the user has disconnected their view, that variable doesn't give me the answer. I need to know whether the user is actually connected at that point in time.
I've separately found code online that detects whether the user has locked their workstation. I had suspected this might work, but unfortunately it returns that the workstation is unlocked even when RDP is disconnected.
Can anyone help?
Thanks,
I am looking for a way of checking or detecting whether the user is currently connected via RDP / MSTSC.
I think I'm half-way there as I can use the ENVIRON$("SESSIONNAME") variable to get either "CONSOLE" or "RDP*". If that variable is "RDP*" then this gives me half of what I need.
However, that variable doesn't tell me whether the user is currently connected and actively viewing the RDP session at that point in time. If the user has disconnected their view, that variable doesn't give me the answer. I need to know whether the user is actually connected at that point in time.
I've separately found code online that detects whether the user has locked their workstation. I had suspected this might work, but unfortunately it returns that the workstation is unlocked even when RDP is disconnected.
Can anyone help?
Thanks,