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? 4 6176
You could perhaps run it as a service, and not let the users have
admin access to kill that service?
Marc
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.
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.
On Jul 28, 5:21*pm, "Larry Smith" <no_spam@_nospa m.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) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 Enterprise 3, Gnome or KDE, Generic PC, 1.5 GHz P-III
CPU, 256 MB RAM, Sun JRE 1.5.0_2.
(These problems present on multiple hardware...
|
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. Mailman with
a BD application behing it might be ideal as it would let users add
and delete themselves and each topic would have it's own email list...
|
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 :
System.Runtime.InteropServices.Marshal.ReleaseComObject, And GC.Collect.
Every time I am opening a new Excel.Application() , I get more Processes in
memory.
Note: I am calling...
|
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, I'd like to be notified. I tried few combinations of Close, Closing,
Application.Exit method, ApplicationExit Event, etc, but nothing seems to be...
|
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.
Has someone any idea why this happens?
Anyway to solve this problem I thought to stop the service and start it
programmatically when it’s “Mem...
| |
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 tried every which way to kill the process, i did all of the following to
no avail:
in the module whose sub main loads the form and then starts...
|
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 manager" item is now
missing. It was there earlier in the day!!
So I right clicked in the menu area at the top, selected 'Custom', then
selected...
|
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 it:
if (e.CloseReason == CloseReason.TaskManagerClosing)
{
MessageBox.Show("from task manager");
}
|
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 process running at highest priority right?. thanks.
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |