On Sun, 30 Apr 2006 20:53:14 +0530, "Ashish Jindal"
<of*********************************************** *@gmail.com> wrote:
Hi,
How do I identify whether a service is "Critical" or not? Basically, I
am writing a program to stop all non-critical service.
AFAIK, the services can be found in
"HKLM\CurrentControlSet\Services\<name>". I am getting the names using the
ServiceController class (in System.ServiceProcess)
-Ashish
I don't think you can. As a service which isn't non-critical normaly
could be critical in certain hardware/software setups. This service
might not even realise it is critical to the computer's operation, it
just happens to be loaded as far as it's concerned.
The best you could do I suppose is have a list of services that are
*probaly* not critical.
Might want to have different lists that can be chosen based upon the
role of that computer.
If you know what the computers setup should be you could create a list
of the services that should always be running for that computer and
consider any other services as non-critical (good for a server I suppose
where someone has decided what should be running, and nothing else)