Link to home
Create AccountLog in
Avatar of sparticus1701
sparticus1701Flag for United States of America

asked on

How to retrieve user's last logon time on standalone machine

I have a Vista standalone machine and would like to programatically (preferrably C#) find the last logon and logoff times of a specific user.  I've seen a lot of people ask how to do this with Active Directory, but this is on a standalone machine.  I'd rather not try to capture and parse the text of a "net user <username>" call, and that won't tell the last logoff.
ASKER CERTIFIED SOLUTION
Avatar of graye
graye
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer