Here is a visual basic code to terminate a task. You will have to use this in many places. For example, when installing a new version of your program you will have to terminate the old one and then uninstall it. You can call the TerminateTask(app_name) function to terminate any running application. You can copy and paste this code to the program.Continue reading