I want to kill a process with a specified process id, not name:
Dim aProcess As System.Diagnostics.Process
aProcess = System.Diagnostics.Process.GetCurrentProcess()
aProcess.Kill()
What is the best way to do that using VB.NET?
If you have the PID, you should do:
Dim aProcess As System.Diagnostics.Process
aProcess = System.Diagnostics.Process.GetProcessById(PID)
aProcess.Kill()