Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Looking for a event id that can tell me that the computer has started

02 Jul 2014   #1
stuart253

Windows 7 professional 64 bit
 
 
Looking for a event id that can tell me that the computer has started

Hello,

Of all of the event ids that are generated when my PC starts, I am looking for one that I can use to trigger an e-mail to myself.

For example, when my backup starts, event id 4097 has been setup to trigger an e-mail to me stating that my backup has started. Event id 4098 has been setup to trigger an e-mail notifying me that my backup has finished.

In the past I had issues with my backups completing. Without going into the details, my backup issue appears to have been resolved. If I do not receive e-mails stating that my backup has started and
ended, I know that there was some issue and I can research the problem.

I sometimes leave my computer on overnight with some application open. In the past, my machine would sometimes restart.

I use to have a problem with my computer crashing or freezing. After my graphic card went bad and had been replaced, I do not believe that my PC crashes as often.

To early an event and I may not be able to send an e-mail.

When I get the e-mail and I know that neither I nor any member of my family did not start the computer, I can look through the logs to see if I can determine why.

Does anyone have a suggestion as to a good event id to trigger on?

If I have select the wrong area to post this thread I apologize .

Thanks in advance

Stu


My System SpecsSystem Spec
.
02 Jul 2014   #2
Ztruker

Windows 10 Pro X64
 
 

You could run a Powershell script from the Startup folder to do this: Something like:

$smtp = new-object Net.Mail.SmtpClient("mail.example.com")

if( $Env:SmtpUseCredentials -eq "true" ) {
$credentials = new-object Net.NetworkCredential("username","password")
$smtp.Credentials = $credentials
}
$objMailMessage = New-Object System.Net.Mail.MailMessage
$objMailMessage.From = "script@mycompany.com"
$objMailMessage.To.Add("you@yourcompany.com")
$objMailMessage.Subject = "eMail subject Notification"
$objMailMessage.Body = "Hello world!"

I did a Google search to find the above: send email from batch file
My System SpecsSystem Spec
02 Jul 2014   #3
carwiz

Windows 7 Pro-x64
 
 

It's much simpler to just create a scheduled task at startup to send an email. "Start up" is one of the events you can specify as a trigger.
My System SpecsSystem Spec
.

03 Jul 2014   #4
Ztruker

Windows 10 Pro X64
 
 

On Windows 8 Send an E-mail is deprecated. Have not tried it on Windows 7.

Looking for a event id that can tell me that the computer has started-deprecatedfeature.jpg


My System SpecsSystem Spec
04 Jul 2014   #5
stuart253

Windows 7 professional 64 bit
 
 
Does the "start up" event have an event id?

Hello carwiz,

Does the "start up" event have an event id? Can one scan for "start up" in the logs?

Thanks

Stu
My System SpecsSystem Spec
04 Jul 2014   #6
carwiz

Windows 7 Pro-x64
 
 

I don't know of a specific event for start up. I checked through mine and couldn't identify anything tied to that event alone. Did you try the Task Schedule? You do need a SMTP server address to send it. Your mail server probably has one. The address will be something like "smtp." followed by your normal server address. This bypasses normal email processes. Probably why W8 won't use it.
My System SpecsSystem Spec
04 Jul 2014   #7
carwiz

Windows 7 Pro-x64
 
 

Quote   Quote: Originally Posted by Ztruker View Post
On Windows 8 Send an E-mail is deprecated. Have not tried it on Windows 7.

Attachment 324123
I found this at Windows Development Center for task scheduler interface:

Quote:
Windows 8 and Windows Server 2012: This interface has been removed. Please use IExecAction with the powershell Send-MailMessage cmdlet as a workaround.
My System SpecsSystem Spec
04 Jul 2014   #8
andrew129260

Windows 10 Pro
 
 

You could use the event viewer application under user profile service started id 1531. I think that would be sufficient. Of course for this the auto login feature must be used. Windows not having a password for only a single account so it auto logins.

Another thing that could work is if you use the action center, the security center service seems to only start when the pc boots, (unless it was manually disabled,stopped) that is event ID 1
My System SpecsSystem Spec
04 Jul 2014   #9
carwiz

Windows 7 Pro-x64
 
 

I tried the task method and couldn't get it to send. I kept getting the error below. Apparently, so does everyone else that attempts it.

CDO_E_SMTP_SEND_FAILED
0x80040211L
The message could not be sent to the SMTP server. The transport error code was %2. The server response was %1


Andrew - Scripted Diagnostics also get Event ID 1.
My System SpecsSystem Spec
04 Jul 2014   #10
Ztruker

Windows 10 Pro X64
 
 

Quote   Quote: Originally Posted by carwiz View Post
Quote   Quote: Originally Posted by Ztruker View Post
On Windows 8 Send an E-mail is deprecated. Have not tried it on Windows 7.

Attachment 324123
I found this at Windows Development Center for task scheduler interface:

Quote:
Windows 8 and Windows Server 2012: This interface has been removed. Please use IExecAction with the powershell Send-MailMessage cmdlet as a workaround.
That's the Powershell script I posted above I think.
My System SpecsSystem Spec
Reply

 Looking for a event id that can tell me that the computer has started




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Computer(and most web pages)started using Italic font. Help!
2 days ago my computer suddenly started using an Italic font and I don't know how to revert it back to the original font that Windows 7 uses for most web pages and Windows Explorer. I also downloaded something which seems to be a registry file for the Windows Vista font, making most fonts in...
Software
Computer started to lag
Hello there.So about 30 mins later my comp started lagging.I was playing on steam offline mode(internet issues) on mount and blade warband and right after i exit a town i am slapped with this wave of lag and buzzing noises from my speakers.I tried restarting and clean upping but till now no...
General Discussion
Computer Crashes 1 hour after started
Hi, I am visiting my parents and their computer crashes EVERY time it is started. Not sure how to fix this, things seem fine under Devices Manager, so I am creating this thread. Thanks very much guys. Erick
BSOD Help and Support
BSOD and immediate restart when computer is started
Intel Core Duo CPU T6500 2.10 GHz Ram 4.00 GB Windows Vista Home Premium 32-bit
BSOD Help and Support
My computer started to randomly BSOD
x86 Originally was Vista FullRetail Installed about 12 months Laptop about 3 years old I'm sorry I can't be any clearer, it's not giving me any errors, just crashing into BSOD. I can't read crash dumps, Thank you so much for your help! P.S. I recently installed f.lux
BSOD Help and Support
Computer freezes just after Windows is started
Hi everyone, For a while, I have freeze problem with my 6-months-old PC with Windows 7 Pro 64-bit. It happens just after I typed account password on log on screen and it is a hard hang. The mouse and keyboard, everything is unresponsive. Sometimes, it freezes even before the desktop is seen (it...
BSOD Help and Support


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 23:38.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App