Solved

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

Posted on 2001-06-02
7
1,135 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Expert Comment

by:danysz
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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