473,322 Members | 1,523 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,322 software developers and data experts.

How can I prevent an application being ended by "Task Manager". Howto keep it always alive?

Dear Members
I have a critical program written in c#. It runs every time the user
log on. But sometimes log-oned user forces my application process to
quit by “End Process” in task manager.

How can I be notified whenever the process is killed by task manager?
I want to keep my process always alive. At least after it is killed, I
want it to be restarted automatically.

Is there any way?
Jul 28 '08 #1
4 6137
You could perhaps run it as a service, and not let the users have
admin access to kill that service?

Marc
Jul 28 '08 #2
I have a critical program written in c#. It runs every time the user
log on. But sometimes log-oned user forces my application process to
quit by “End Process” in task manager.
How can I be notified whenever the process is killed by task manager?
I want to keep my process always alive. At least after it is killed, I
want it to be restarted automatically.
Is there any way?
You (ultimately) can't prevent an application from being terminated by
someone with the appropriate rights. A user can normally terminate an app if
they started it but not an app started by another user. Note that you can
write a service to monitor the app and if it goes down, the service can
immediately re-start it. Of course someone can always kill the service
itself but only administrators normally. Depending on the app, you may
therefore want to write it as as a service instead (which sounds like what
you need here). Again, only administrators can (normally) terminate it. If
someone does, they do so at their own risk.
Jul 28 '08 #3
I know most places have some kind of access restriction on certain
applications. Where I used to work I was a local administrator but
someone above me made it so I couldn't do an "End Process" on Norton
Anti-Virus. You might not be looking for a coding solution as much as
an access restriction solution.

Jul 28 '08 #4
On Jul 28, 5:21*pm, "Larry Smith" <no_spam@_nospam.comwrote:
I have a critical program written in c#. It runs every time the user
log on. But sometimes log-oned user forces my application process to
quit by “End Process” in task manager.
How can I be notified whenever the process is killed by task manager?
I want to keep my process always alive. At least after it is killed, I
want it to be restarted automatically.
Is there any way?

You (ultimately) can't prevent an application from being terminated by
someone with the appropriate rights. A user can normally terminate an appif
they started it but not an app started by another user. Note that you can
write a service to monitor the app and if it goes down, the service can
immediately re-start it. Of course someone can always kill the service
itself but only administrators normally. Depending on the app, you may
therefore want to write it as as a service instead (which sounds like what
you need here). Again, only administrators can (normally) terminate it. If
someone does, they do so at their own risk.
Thank you Larry. Your solution was a good one.
(And thanks others)

Jul 29 '08 #5

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

Similar topics

2
by: John E. Hadstate | last post by:
Please forgive the heavy cross-posting and feel free to delete inappropriate groups when you reply. I am really at a loss and hope someone has an answer for my problems. Environment: Redhat...
4
by: Al Dykes | last post by:
I'm going to be collecting lots (a few thousand) email addys. Each of these people will be interested in recieving mail on one or more topics, with an open ended and growing number of topics....
4
by: Leeor Chernov | last post by:
Hi , I Used the object Excell Application(COM INTEROP) and it is staying as an open process, And the owner(User Name) is ASPNET Altough I try to release it with :...
4
by: Strah | last post by:
Is there a way to catch the event of terminating the application from the the processes tab in task manager? I have created windows app, and if a user termintates the app in the task manager,...
4
by: Niron kag | last post by:
Hi, I have a windows service, which is currently installed, on my local computer. The problem is that when I look at the task manager, I see that the “Mem Usage”, become bigger and bigger....
4
by: ray well | last post by:
on my developing system, when my app exits, it always gets removed withing a second from the task manager. on my clients machine, the app exits but stays indefinitely in the task manager. i...
1
by: Brad Pears | last post by:
I am working on a vb .net 2005 project. Recently I wanted to changed the location of my builds from debug to release. I clicked on the 'Build option and for some unknown reason, the "configuration...
4
by: e-Ricc | last post by:
Hi guys! Im trying to detect when a user "kills" my c# app using windows task manager, i've tried with the form events _closing and _closed managing for example putting an if inside to detect...
4
by: tvnaidu | last post by:
How can I cheack CPU load on LINUX like "Windows Task manager" on Windows?. Windows task manager shows CPU load (percentage) and etc, any tool in LINux?. I know "top" command which shows which...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.