Solved

VB.Net Automatically killing processes that have not closed properly

Posted on 2015-01-28
1
123 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
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now