0

Hello everyone
Is there any way to kill the python.exe in Task Managaer "On Windows" using visual basic
The Problem is that i do open more than 1 python file at the same, But on task manager it's hows me something like this
Python.exe
python.exe
python.exe
python.exe
I have got the code to kill any progress in the task manager using Visual basic, But It doesn't work with python, Because i can't tell which one i opened first or which one was the second or the last

Code:

Dim p() As System.Diagnostics.Process = Process.GetProcessesByName("python")
        If p.Length = 1 Then
            p(0).Kill()

any body could help me with this please?
Thanks :)

3
Contributors
3
Replies
5
Views
5 Years
Discussion Span
Last Post by Lardmeister
1

This doesn't have anything to do with Python. See if the task manager gives a create time or does something simple, like number the processes sequentially so you can tell which is which. Perhaps someone else will know something more about Visual Basic and the Task Manager.

0

Thanks woooee
Where do you think I should post this or look for this ?
Thanks again

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.