[Help]Terminating Specific Processes?[Help]

Posts 18 of 8 · Page 1 of 1
[Help]Terminating Specific Processes?[Help]
I was wondering what is the best way to terminate a specific process running on your PC.
Like if i wanted to press a button it would terminate Google Chrome.
I'm trying to make it where, if it is running it will terminate it, otherwise if it isn't running a MsgBox will say so.
[php] For Each p In Process.GetProcessesByName("Notepad")
p.Kill()
Next[/php]
Thanks for that, but is there anyway to tell if Notepad is running..Like
If p was running it would .Kill it
Else
If it wasn't running a message box would say it isn't running
Quote Originally Posted by HiddenoO View Post
Thanks for that, but is there anyway to tell if Notepad is running..Like
If p was running it would .Kill it
Else
If it wasn't running a message box would say it isn't running
[php]if Process.GetProcessesByName("notepad").Length = 0 Then
'it not running'
else
'1 or more is running'
'the length is the amount of notepads running. '
End If[/php]

type on ps so it could got some bugs.
Quote Originally Posted by topblast View Post

[php]if Process.GetProcessesByName("notepad").Length = 0 Then
'it not running'
else
'1 or more is running'
'the length is the amount of notepads running. '
End If[/php]

type on ps so it could got some bugs.
I got it fixed up and running, thanks for the help.
Quote Originally Posted by HiddenoO View Post
I got it fixed up and running, thanks for the help.
It seems solved
Solved then?
Quote Originally Posted by Lolland View Post
Solved then?
Yes, it's solved.
Posts 18 of 8 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?