[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

kill a process in task manager only for a certain user name

Posted on 2006-04-07
4
Medium Priority
?
534 Views
Last Modified: 2013-12-03
Hello experts,

Is there a way to get the user who owns the process in the Process[] collection retrieved by Process.GetProcessByName("ANYNAME")?

I see more than one instance and I only want to kill the process that belongs to a specific user. The server is a terminal server by the way. Thanks in advance,

Alpha Guys
0
Comment
Question by:AlphaGuys
4 Comments
 
LVL 7

Expert Comment

by:mjmarlow
ID: 16404784
Someone already answered this more or less:
http://www.experts-exchange.com/Programming/Q_21769176.html
0
 
LVL 30

Accepted Solution

by:
Alexandre Simões earned 2000 total points
ID: 16404872
0
 
LVL 1

Expert Comment

by:anand2k
ID: 16413887
Hi,

If u r running Windows XP, simply use
 TASKKILL /S system /U username /P password /FI "IMAGENAME eq note*"

Goto Command Prompt and type "TASKKILL /?" which will kill the exact Process for that user on ur local box or any remote machine, provided the user logged in has Admin privilage on the remote or local box because thats under OS Kernal. :-)

In another OS, i guess just copying the TASKKILL from windows XP to target OS is sufficient. Not 2 sure abt it.

Anand
0
 

Author Comment

by:AlphaGuys
ID: 16417004
Thanks for the answers guys, looks like Alex pointed out a good link. My application runs on a terminal server (WIN2k3server) and a number of users can log on and run my application. My main concern is the hanging Office and sometimes Adobe applications. I would like to kill those processes(EXCEL.EXE, WINWORD.EXE, etc) from my application but only for the user who is running that application. I will try out Alex's link and see if I can do it even with the users just having limited permissions. Thanks again for all your help!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month18 days, 20 hours left to enroll

834 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