How to get an alert when someone logged on my PC?

17

7

I wish to send myself an mail, a message or an alert when someone logged on my machine. Is that possible to configure on my Windows 7 machine?

Gowtham Eswaramoorthy

Posted 2016-03-12T12:28:35.867

Reputation: 183

Answers

26

Yes, you can do this.

Go to start > Control Panel > Administrative Tools > Task Scheduler

First Leftclick then Rightclick on Task Scheduler Library and select Create Task...

At Name, give it a name that is recognizable to you.

To to the tab Triggers

Press New...

At the top after Begin the task: On a schedule change this to: At log on and press OK

Go to the Actions tab and press the New... button.

At Action: Start a program change to Send an e-mail

Fill in all the forms, Attachment is optional. SMTP server has to be a valid smtp server. Choose the one from your ISP. If you don't know, google for SMTP server [name of isp]

Finally press OK

This will send an email everytime a user logs in, including yourself, so log out and back in to test if it works.

You may be able to use %USERNAME% in your message to show who is logged in. Given that I am on windows 8.1 I am not able to test this as the e-mail function is deprecated in this OS version.

Important notice: This does NOT work in Windows 8 or later, nor Windows Server 2012. Sending an email or displaying a message is a deprecated function in these OS's. Displaying a msg can be done differently using start a program msg * type message here

LPChip

Posted 2016-03-12T12:28:35.867

Reputation: 42 190

though your script can send email va say powershell. – joojaa – 2016-03-12T15:06:07.707

@joojaa Yes it could, but given that this still works natively in windows 7, I didn't include that in my answer. – LPChip – 2016-03-12T15:36:56.640

1I thought that Windows was supposed to be easy. In Ubuntu just add mail -s “Someone logged in” you@gmail.com to the profile file. – dotancohen – 2016-03-13T15:14:14.350

Who said Windows was supposed to be easy? joke – DIDIx13 – 2018-02-23T13:25:20.383

I mean is this hard though? – Tom – 2019-02-07T00:43:30.183