This code shows a list of the processes and their identifier (PID) and saves the list in a text file. Then you have the option to kill a certain process by its name.
If you run it as non-admin user it may not identify the name and PID of some processes