Help needed to get last login info of currently logged user

A

alps

Hi all,
I have one requirement in which i have to show last login information
of the administrator after each successful login into system. the
Information to be displayed could be in the form of banner.

I have to Last login date time, Number of unsuccessful login attempts
made by current user before successful login, Location of workstation
when the current user have last logged in.

Now, Here i have tried lot of VBscripts. for Lastlogin datetime I have
used LastLogin variable but the date time i have got shows current
session login time. Suppose the Adminstator has logged in yesterday
and administrator logges in today then lastlogin should show
yesterday's login datetime not the current session. I have tried to
use lastlogoff property but seems it is not updated.

BadPwsCount property is also does not return any value.

I am not using Active Directory or LDAP on Windows 2000 Server.

Please help me out with this problem.
Any help will be appriciated.

Thanks In Advance

Alpesh
 
P

Pegasus \(MVP\)

alps said:
Hi all,
I have one requirement in which i have to show last login information
of the administrator after each successful login into system. the
Information to be displayed could be in the form of banner.

I have to Last login date time, Number of unsuccessful login attempts
made by current user before successful login, Location of workstation
when the current user have last logged in.

Now, Here i have tried lot of VBscripts. for Lastlogin datetime I have
used LastLogin variable but the date time i have got shows current
session login time. Suppose the Adminstator has logged in yesterday
and administrator logges in today then lastlogin should show
yesterday's login datetime not the current session. I have tried to
use lastlogoff property but seems it is not updated.

BadPwsCount property is also does not return any value.

I am not using Active Directory or LDAP on Windows 2000 Server.

Please help me out with this problem.
Any help will be appriciated.

Thanks In Advance

Alpesh

You could place this batch file into the Startup folder of the
"All Users" profile:
@echo off
echo %date% %time:~0.5% %UserName% >> %SystemRoot%\logon.log

Now get your script to read the second line from the bottom in
logon.log.
 

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