A process is an application in execution. Each application on a Windows based computer has its own processes. Using the Windows Task Manager it is possible to view the list of running applications and processes on the local PC. It may be useful to be able to save a list of running processes in a text format and automatically email them to a specific destination.
For example, network administrator can ensure that a particular process is running on a server. The following example demonstrates how to create a batch file that will email a list of running processes at a given time. It will be scheduled so that it runs every hour.
Create a new task using the Windows Task Scheduler that runs the batch file every 1 hour.
rem Gather a list of applications
rem Sending email with process list attached...
febootimail -SERVER mail.example.com -FROM email@example.com -TO firstname.lastname@example.org -SUBJECT List of requested server processes -ATTACH proclist.txt
del proclist.txt >NUL
tasklist command retrieves a list of running processes, and stores it in the
febootimail sends list to Administrator.
3: SERVER sets outgoing mail server.
4: FROM specifies who is sending the email.
5: TO is the recipient of the email.
6: SUBJECT defines the subject of the message.
7: ATTACH adds the list of processes to the email.
This example shows basic concept on how to retrieve any application output and send it via email.