When did I log on to my WIndows 7 machine this morning?

9

1

I would like to find a record of my exact login time this morning. But here's the wrinkle: Our sys admins will not let us open a command shell or view security logs. This makes this question rather different from other similar questions I have seen on this site. Any ideas? Thanks.

bob.sacamento

Posted 2013-05-23T16:32:29.780

Reputation: 481

Looks like there are a few good suggestions at http://superuser.com/questions/15596/automatically-run-a-script-when-i-log-on-to-windows

– Jeff – 2014-08-15T21:29:13.650

Details of how to set up an automatic history log of login/logon, lock and logoff times are provided at the Stackoverflow answer Counting computer login times for the week

– MechtEngineer – 2017-12-30T11:41:15.573

You're not even allowed to open the Command Prompt?! Can't you ask them to check and tell you? – Karan – 2013-05-23T16:33:52.107

Yep. Can't even open a command prompt. Can you believe it?!?!? Could ask, I guess. But this is something I would like to do regularly, and I don't want to keep bugging them. – bob.sacamento – 2013-05-23T16:35:19.560

Answers

12

I'm in the same boat as you (no command prompt) and this worked for me:

Create a new file containing the following lines:

quser
pause

Rename the file to something like "loginTime.bat" and double-click it.

This is a combination of Will.Benniger's answer on this page, and paradd0x's found here: Show Windows 7 logon time?

user187557

Posted 2013-05-23T16:32:29.780

Reputation: 236

6

if you cannot open Eventvwr and view security logs, you will not be able to determine this. if you can, look for event id 4624. the login type param will tell you what kind of login it was. look for 2 (user login), and 7 (account unlocked; if you don't logout/shutdown overnight).

http://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=4624

Frank Thomas

Posted 2013-05-23T16:32:29.780

Reputation: 29 039

6

You can try to use a batch file that would display it for you in the command prompt and pause waiting for input. This will typically circumvent the usual lazy IT method of blocking CMD.

Open a notepad document and insert the following:

net user YourUsernameHere /domain | findstr Last
pause

After, save it as logontime.bat

Double click the batch file that you saved and it should come up under Last Logon

Will.Beninger

Posted 2013-05-23T16:32:29.780

Reputation: 1 402

And just to confirm, that's the actual last login and not the last time the screen was locked right? – Erikster – 2014-11-24T21:20:07.953

1@Erikster Just saw this when someone upvoted my answer. This is actually the initial login. I have a bad habit of perpetually hibernating my work computer so it shows my last login as a about a week ago: Last logon 2016-11-14 14:48:32 – Will.Beninger – 2016-11-22T16:31:47.803

1On a Windows 7 AD domain I had to add /domain to the end for this to work. You could also add "| findstr Last" to show only the "Last logon" time. – Dave Noonan – 2013-05-23T16:52:39.520

Thanks for the help. Tried it. Unfortunately, it looks like our IT guys aren't lazy. It seems they mean business. – bob.sacamento – 2013-05-23T19:14:32.760

5

The method described in the accepted answer does not necessarily give you the time you logged-in this morning. The method gives you the last logon event but since there can be multiple events during the same session (even if you don't logout or lock your workstation yourself) you need to get the first event of the day.

If you are not able access the security logs for the first event your chances of figuring this out may be limited.

Muton

Posted 2013-05-23T16:32:29.780

Reputation: 151