Re: Users last logon info from logon script
From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 04/23/05
- Next message: Shenan Stanley: "Re: Antispyware beta- virus after downloading"
- Previous message: Manticor: "Re: Antispyware beta- virus after downloading"
- In reply to: monk: "Re: Users last logon info from logon script"
- Next in thread: monk: "Re: Users last logon info from logon script"
- Reply: monk: "Re: Users last logon info from logon script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sat, 23 Apr 2005 18:51:40 +0200
monk wrote:
> Hi Torgeir,
>
> I put this line in the users logon script: wscript
> \\dc1\netlogon\lastlogon.vbs. Then when users logon, they get a
> popup window tells them the last logn time - it all seemed good.
> But, the last logon time that is in the popup window is actually
> the cyrrently logon time!?
>
> If I run the script manually, it shows the last logon time. Even
> when I run the logon script manuelly, it still shows the last
> logon time. But when users logon, the popup window shows the
> currect logon time.
>
> I guess it is because Windows update the lastlogon attribute
> once a user logs on to the domain? How can I prevent this?
You can't.
> How can I get the correct LAST logon time?
You need to save the value obtained by the script somewhere, and
display the saved value at next logon. You can save the value in a
file on a file server, or in an unused attribute in the user object
in AD.
-- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scriptcenter/default.mspx
- Next message: Shenan Stanley: "Re: Antispyware beta- virus after downloading"
- Previous message: Manticor: "Re: Antispyware beta- virus after downloading"
- In reply to: monk: "Re: Users last logon info from logon script"
- Next in thread: monk: "Re: Users last logon info from logon script"
- Reply: monk: "Re: Users last logon info from logon script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|