Solved

VB.Net Automatically killing processes that have not closed properly

Posted on 2015-01-28
1
132 Views
Last Modified: 2015-01-28
Hi Experts.  On our terminal servers, we often have processes that have hung or not closed properly.   Does anyone know of a way to identify processes that are not live, "owned" or have been running for hours, and a way of killing them?  There are some programs that have known issues on Terminal Server and writing something would save us having to go into the server and kill the processes.  Thanks in advance
0
Comment
Question by:PNRT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 15

Accepted Solution

by:
ChloesDad earned 500 total points
ID: 40575903
To get an array of all the process do this

         ' Get all processes running on the local computer. 
         Dim localAll As Process() = Process.GetProcesses()

Open in new window


The process class has properties, Kill, which kills the process, Responding which indicates if the UI is responding, and starttime, which you can use to work out how long the process has been running.
0

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question