Not terminate processes

Hi Experts,

There is some processes in windows xp can not be finalized. when trying to finalize the process the following message appears: "This is a critical system process. Task Manager cannot end this process"
I bought a program that does not end the process too, appears the same message.      
My question is: How to do this with a program in Delphi (not allow the user to finalize the process) ?

I'm using delphi 7 with windows xp pro

Thanks for some help
Alexandre
Brazil
alpiresAsked:
Who is Participating?
 
ThievingSixConnect With a Mentor Commented:
You can do it in delphi. Look up madshi code hook on google. It includes an example of how to prevent a delphi program from being shutdown.
0
 
ThievingSixCommented:
What type of process is it? If it is a windows process it might be a permissions issue. If it is an antivirus program there might be a hook or kernel driver that blocks it from being ended,
0
 
alpiresAuthor Commented:
Hi, this process for example: smss.exe
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Geert GOracle dbaCommented:
some processes are for the windows kernel.
You will only succeed in stopping them by stopping windows.

http://www.liutilities.com/products/wintaskspro/processlibrary/smss/
0
 
ThievingSixCommented:
http://www.beyondlogic.org/solutions/processutil/processutil.htm

See if this works for killing the process. If it does we can figure out how it does it and go from there.
0
 
Geert GOracle dbaCommented:
maybe it is a service which has to be stopped using services.msc
or net stop from the command line
0
 
alpiresAuthor Commented:
But exist some way to do this in delphi, like a program that can not be finalized by the gui of Task Manager ?
0
 
Geert GOracle dbaCommented:
nope, not really
this would mean windows can not shut down either ...
0
 
Geert GOracle dbaCommented:
the actual only way to do this is with system administrator, install a program and run it
when a user logs in, do not give the rights to administer that program.
windows can still shut it down

it's like running a service with the system account
0
 
DanRollinsCommented:
It sounds like you want you want to prevent somebody from closing your process.

If so, then note that the Task Manager will not close a task if another running task depends on it (that's wehre that message comes from).  It might be possible for you to create a second process and have it set the first task as a dependancy.  Perhaps jjust holding open a Handle to it might do the trick.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.