In 2K / XP, is it possible via an API or something, to check to see when a user last logged on?
I'll be writing it in to an app i'm creating, so any help would be great.
Regards,
Paul.
Printable View
In 2K / XP, is it possible via an API or something, to check to see when a user last logged on?
I'll be writing it in to an app i'm creating, so any help would be great.
Regards,
Paul.
*bump*
VB Code:
Private Sub Form_Load() Dim User as string Dim filnr As Integer User = Environ("userName") filnr = FreeFile Open App.Path & "\Uselogger.txt" For Append As filnr Print #filnr, User & " Logged on at " & Date & " " & Time Close filnr End Sub
Good idea... and i'de already programmed something like that...
But a program can be overwritten or the process stopped and therefore wouldn't show in the logs.
If you stopped the windows kernel... you couldn't log in. There must be a log somewhere from windows surely.
Regards,
Paul.
Why did you ask for help with creating a logfile when you say that there already exist the logfile you want? :confused:
Thank you for the help...
But at no point during my post did i ask how to create a logfile. Anyone with any VB knowledge should know that!!!
Anyone else with knowledge of the windows kernel?
Regards,
Paul.
I do have some VB knowledge.Quote:
Originally posted by VisionIT
Anyone with any VB knowledge should know that!!!
My code created a logfile where you could see when a user last logged on. Right?Quote:
In 2K / XP, is it possible via an API or something, to check to see when a user last logged on?
Just an idea: If you go to "C:\Documents and Settings\" you got some subfolders where you got some dat and logfiles. Maybe you can read the datestamp or something like that from this files...