0

Hello once again and I need some help. I am developing an automatic updating component to update one of my other apps in vb.net. The problem is that IFF an update is available, the update app has to be able to "kill" the app that is being updated. Note that the update app and program app are 2 separate projects and have no connection what so ever. I am wondering if there is a way to kill that program app's process from the update app. I have looked at several examples, but they start and stop the process in the code. I want to be able to search for a process by name and then kill it(NOT START AS IT IS ALREADY RUNNING). Any help is appreciated! (NOTE: Those who redirect to another link will not get best answer)

Josh Menzel
  • 2,221
  • 4
  • 20
  • 29
  • What I want to accomplish is similar to going into task manager and going to processes and selecting a process to end. – Josh Menzel Nov 25 '12 at 19:56

1 Answers1

1

I have done something similar to this before. If I am understanding your requirements correctly then you need to use the GetProcess in the System.Diagnostic namespace. There is more information about it here: http://msdn.microsoft.com/en-us/library/system.diagnostics.process.kill.aspx.

w0051977
  • 13,975
  • 26
  • 129
  • 295
  • yes I know that much, but I need to know how the entire thing works. I want to be able to say: kill this process using a name – Josh Menzel Nov 25 '12 at 20:27
  • Does this link help?: http://stackoverflow.com/questions/116090/how-do-i-kill-a-process-using-vb-net-or-c. I know it is written in C# but it should be simple to convert to VB.NET. – w0051977 Nov 25 '12 at 20:29
  • No problem. If this has answered the question then please mark it as answered. If it has not completely answered the question then please supply more details and I will try to help further. – w0051977 Nov 25 '12 at 21:08