Phisn
Phisn

Reputation: 881

Determine if process is system relevant

I have a HANDLE to a process and would like to know if the process is system relevant, like the taskmanager does in the image below.

If I try to close such a process though the taskmanager, it asks me to either shutdown the whole computer or cancel. (I have not found anything related to this)

Upvotes: 2

Views: 831

Answers (1)

catnip
catnip

Reputation: 25388

The 'insider' term for such processes is "critical processes" - that is to say, processes that Windows needs to have running at all times in order to function properly. A good example is the process that manages the logon screen (WinLogon) - can't do much without that.

Raymond Chen wrote a blog post about this recently. Amongst other things, he had this to say:

  1. IsProcessCritical() determines whether the specified process is considered critical.

  2. In addition to these, Task Manager also keeps a hard-coded list of processes that it puts in the "Windows processes" list whenever it sees them, for example Console Window Host (which hosts the window(s) for running console apps) and Desktop Window Manager.

I've no idea how you would get hold of the contents of that list.

Raymond goes into more detail about what a critical process actually is in his blog. Try terminating one in the 'Details' tab, if you want to bluescreen your computer.

Upvotes: 5

Related Questions