Here are  two ways to write to the Event log in Windows and indicate the source of the message. Reportevent External Function and Eventcreate command line command You can use the command shell to do this too but this has the drawback of not being able to assign the source of the event. First you need…