Solved

How to prevent a Process from being killed in task list?

Posted on 2001-06-02
7
1,136 Views
Last Modified: 2012-05-04
in 98 I can  hide the process
be in NT/2000,it seemed not so easy

how can I prevent my soft to be closed in NT/2000?
0
Comment
Question by:keron
7 Comments
 
LVL 2

Accepted Solution

by:
danysz earned 100 total points
ID: 6149963
u can make it as a service and give authorization just to a specific user to kill it ....

daniel
0
 
LVL 1

Expert Comment

by:edsteele
ID: 6161455
Did you try using the OnClose event in your main form?  You should be able to write something like:

procedure TForm1.Form1Close(Sender: TObject, var Action: TCloseAction);
begin
  Action := caNone;
end;

You may want to put some logic around that, so when you really do want the program to close, it will. :)
0
 

Expert Comment

by:Micke_Holm
ID: 6163079
I'd have to go with danysz idea...

OnClose will not even be called if you choose your apps-process in the processlist in the Task Manager and click End Process.

This way of shutting down the process is using the Windows API TerminateProcess and it just pull the plug on your process. The process that are beeing killed doesn't have a chance to do any cleaning up or even to respond.

The only way to stop some one from killing your process is to make it a service and give authorization to a specific user to end it... Perhaps you could authorize only the SYSTEM accout to kill the service...

//Mikael
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Expert Comment

by:danysz
ID: 6163405
hi mikael

thanks

yes u can do it..
but the best think is to make it available just for specific user even not for SYSTEM if u want t have it real protected. in this case u just have to add him a function to catch shut down of windows to shut down yourself...
also to be sure that the message is not faked ( send from somebody just to your application ) u shall make your service to wake before some critical services and also check that other critical services are depending on you and they are going down too...

also u can take for example service like browser that is looking for server and to put your service between ....
browser is looking for you and your are starting only after server ....

daniel
0
 
LVL 1

Expert Comment

by:edsteele
ID: 6165129
I wasn't sure if that would work from a Task Manager kill or not.  Thanks for the info!
0
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 8891045
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Please accept danysz's comment as answer.

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Robert Marquardt
EE Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Edureka is one of the fastest growing and most effective online learning sites.  We are here to help you succeed.

912 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

17 Experts available now in Live!

Get 1:1 Help Now