PDA

View Full Version : logoff setting (All)



projectjak
01-22-2004, 10:18 AM
hai ,

How to detect whether any user has logged into a (remote) computer

or if the computer is simply switched on without any user logging

into the system ? I want to fetch the details from the

remote computer's registry . Which entry in the registry contains

those details ? I wan't to know the the exact entry in the registry

which tells whether any user has logged into a computer or if

the computer is simply switched on .


OS : Windows (98 and later versions)


Please help me out if u have any ideas .

bye.

jdharm
01-23-2004, 11:59 AM
There are a couple of places. When connecting to the remote registry if you go to the HKEY_USERS hive the username will be listed as a sub folder along with .DEFAULT.

If you highlight the key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contro l then there is a string value called "Current User" with the name in the right hand frame.

At least this is how it is on my Win98SE machines. However, I have found that these values do not get removed when the user logs out. When I read these values and see a username I know that someone has logged on since the machine was last restarted, but I have no way of knowing if they are currently logged on or if they were simply the last to be logged on at that machine. The only way to be sure is to write a log out script that records the time they logged out or to check the domain controller's event log.

Josh
<a target="_blank" href=http://www.jdharm.net>www.jdharm.net</a>