Can I determine if a local session is open on a remote computer ?

Hello !

I make a connexion to the remote machine registry (RegConnectRegistry) and I check this value :

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName

So I can get the last username who logged on the remote computer.

But how can I check if his windows session is open or not ?

I'll hope you can help me ! :-)

thanks (and sorry for my english)
daneelvosgesAsked:
Who is Participating?
 
jkrCommented:
All you need to do is checking the keys under 'HKEY_USERS'. Apart from that, check out 'PsLoggedOn' (http://www.sysinternals.com/ntw2k/freeware/psloggedon.shtml), which comes with full source code: http://www.sysinternals.com/files/PsLoggedonSrc.zip
0
 
jkrCommented:
BTW, regarding the registry entries - for each user logged on, the system loads the user's profile to that key, just to clarify.
0
 
daneelvosgesAuthor Commented:
It's work !

Thanks ! :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.