Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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

share|improve this answer
though your script can send email va say powershell. – joojaa Mar 12 at 15:06
@joojaa Yes it could, but given that this still works natively in windows 7, I didn't include that in my answer. – LPChip Mar 12 at 15:36
I thought that Windows was supposed to be easy. In Ubuntu just add mail -s “Someone logged in” to the profile file. – dotancohen Mar 13 at 15:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.