Results 1 to 7 of 7

Thread: Checking when a user last logged on.... STILL UNRESOLVED

  1. #1

    Thread Starter
    Fanatic Member VisionIT's Avatar
    Join Date
    Nov 2002
    Location
    Workin'...
    Posts
    718

    Checking when a user last logged on.... STILL UNRESOLVED

    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.
    Last edited by VisionIT; May 5th, 2003 at 05:51 AM.

  2. #2

    Thread Starter
    Fanatic Member VisionIT's Avatar
    Join Date
    Nov 2002
    Location
    Workin'...
    Posts
    718
    *bump*

  3. #3
    Hyperactive Member Libero's Avatar
    Join Date
    Jun 2000
    Location
    Swedish viking
    Posts
    460
    VB Code:
    1. Private Sub Form_Load()
    2. Dim User as string
    3. Dim filnr As Integer
    4. User = Environ("userName")
    5. filnr = FreeFile
    6. Open App.Path & "\Uselogger.txt" For Append As filnr
    7. Print #filnr, User & " Logged on at " & Date & " " & Time
    8. Close filnr
    9. End Sub

  4. #4

    Thread Starter
    Fanatic Member VisionIT's Avatar
    Join Date
    Nov 2002
    Location
    Workin'...
    Posts
    718
    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.

  5. #5
    Hyperactive Member Libero's Avatar
    Join Date
    Jun 2000
    Location
    Swedish viking
    Posts
    460
    Why did you ask for help with creating a logfile when you say that there already exist the logfile you want?

  6. #6

    Thread Starter
    Fanatic Member VisionIT's Avatar
    Join Date
    Nov 2002
    Location
    Workin'...
    Posts
    718
    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.

  7. #7
    Hyperactive Member Libero's Avatar
    Join Date
    Jun 2000
    Location
    Swedish viking
    Posts
    460
    Originally posted by VisionIT
    Anyone with any VB knowledge should know that!!!
    I do have some VB knowledge.

    In 2K / XP, is it possible via an API or something, to check to see when a user last logged on?
    My code created a logfile where you could see when a user last logged on. Right?

    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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width