Perfect!
Much shorter code,. much clearer, and works well when there are multi-logins to the same server both from Console and RDP - simultaneously (same time).
thanks Marcus!
Search found 2 matches
- Thu Jan 24, 2013 11:52 am
- Forum: Scripts and Tips
- Topic: Is User Logged in via Remote Desktop or Console?
- Replies: 6
- Views: 27414
- Thu Jan 24, 2013 12:07 am
- Forum: Scripts and Tips
- Topic: Is User Logged in via Remote Desktop or Console?
- Replies: 6
- Views: 27414
Re: Is User Logged in via Remote Desktop or Console?
Code to determine whether the active user is logged in via Remote Desktop or locally. VBSTART Function UserType(sHost) If sHost = "" Then Exit Function '-----> return Empty End if Set oShell = CreateObject("Wscript.Shell") Set oFS = CreateObject("Scripting.FileSystemObject") sTmpFile = oFS.GetSpeci...