473,394 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Checking for Other Apps running

Hi,

I have a need to create an app that will check on my pc what apps are
running and if one is found that shouldn't be running, shut it down.
How can I do this in c# or what areas should I be looking at in the
framework? Code samples or snips appreciated.

Thanks,

JJ

Nov 17 '05 #1
2 1257
Hi,

you could use the Process class of the framework. With the GetProcesses
method you get the processes with the Kill method you can stop a
process.

Cheers
Lars Behrmann

_________________
Nothing is impossible. UML is the key for all your problems.
AODL - Make your .net apps OpenOffice ready
http://aodl.sourceforge.net/

jj****@hotmail.com schrieb:
Hi,

I have a need to create an app that will check on my pc what apps are
running and if one is found that shouldn't be running, shut it down.
How can I do this in c# or what areas should I be looking at in the
framework? Code samples or snips appreciated.

Thanks,

JJ


Nov 17 '05 #2
something like this
Process[] processes = Process.GetProcesses();
foreach(Process process in processes){
if(process.MainWindowTitle == "SomethingWhatIWant"){
process.CloseMainWindow();
// or if it is not having main window then kill it
// use only one of this, dont need both
process.Kill();
}
}

Mihir Solanki
http://www.mihirsolanki.com
Hi,

I have a need to create an app that will check on my pc what apps
are running and if one is found that shouldn't be running, shut it
down. How can I do this in c# or what areas should I be looking at in
the framework? Code samples or snips appreciated.

Thanks,

JJ

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Moosebumps | last post by:
I'm wondering what kind of checking I can do on a python program before running it (besides reading over every line). I hate running a long python script, only to have it fail at the end because I...
4
by: GujuBoy | last post by:
i want to check to see if a certain program is installed on my windows box using python. how can i do that...(ie, i want to see if "word" is installed) please help
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
3
by: Deasun | last post by:
Good morning In vb.net how would one go about checking if the app is already running Need some pointers on this Thank Deasun
0
by: Mike Meyer | last post by:
The recent thread on threads caused me to reread the formal definition of SCOOP, and I noticed something I hadn't really impressed me the first time around: it's using staticly checkable rules to...
30
by: Michael B Allen | last post by:
I have a general purpose library that has a lot of checks for bad input parameters like: void * linkedlist_get(struct linkedlist *l, unsigned int idx) { if (l == NULL) { errno = EINVAL;...
2
by: Max | last post by:
I'm fairly new to distributing .NET applications, and so far no one is able to use the apps I create. They do run on all 3 of my machines. I include the dotnetfxredist with the setup files. One...
0
by: Jm | last post by:
Hi All Ive got a service written in .net and siply because i dont know anyother way than what i remember from vb6 i am using the following code to check user details dim licmgr as new licmgr...
13
by: John | last post by:
Hi How can I send simple messages/command like "GotoClientRecord=1024" or "GotoSupplierRecord=234" from a vb.net app to a) a vb.net winform app and b) an MS Access app, all three running on the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.