469,904 Members | 2,472 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,904 developers. It's quick & easy.

End process from Task Manager using programming?

LBT
Hi experts,

Sometimes there is some "unkilled" processes remained in Task Manager. For
instance, there is a task to generate picture using ASP image scheduled by
SQL job but somehow certain processes like cmd.exe and IExplorer.exe are not
released and cause the SQL job non-stop running.

Even with kill job signal being sent to SQL but the SQL job will not be
cancelled until cmd.exe and IExplorer.exe are manually terminated using Task
Manager. The problem is this action require human attention and quite
irritating. Any way to do the programming (using VB.NET) to check for these
processes which are run under certain user so that can terminate them by code?

Thanks.
Nov 1 '06 #1
1 2456
Just posted this in the other newsgroup for someone the other day.

This should get you started.

'Where textbox1.text = "NOTEPAD" not NOTEPAD.EXE
Dim myProcesses() As Process
Dim myProcess As Process

myProcesses = Process.GetProcessesByName(Trim(TextBox1.Text))
For Each myProcess In myProcesses
myProcess.Kill()
Next

Cheers

Miro
"LBT" <LB*@discussions.microsoft.comwrote in message
news:65**********************************@microsof t.com...
Hi experts,

Sometimes there is some "unkilled" processes remained in Task Manager. For
instance, there is a task to generate picture using ASP image scheduled by
SQL job but somehow certain processes like cmd.exe and IExplorer.exe are
not
released and cause the SQL job non-stop running.

Even with kill job signal being sent to SQL but the SQL job will not be
cancelled until cmd.exe and IExplorer.exe are manually terminated using
Task
Manager. The problem is this action require human attention and quite
irritating. Any way to do the programming (using VB.NET) to check for
these
processes which are run under certain user so that can terminate them by
code?

Thanks.


Nov 1 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

77 posts views Thread by Charles Law | last post: by
2 posts views Thread by Mark Jacobs | last post: by
9 posts views Thread by SeC | last post: by
4 posts views Thread by e-Ricc | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.