How to programmatically disable a Windows XP print spooler service in C #

I need to write a small console application (patch) that disables the print spooler service, performs several actions, and then starts the print spooler service. I would like to write this in C #. Can someone point me in the right direction? Thanks in advance!

+3
source share
3 answers

Perhaps you can do this with the ServiceController class:

ServiceController controller = new ServiceController("Spooler");
controller.Stop();
...
controller.Start();
+5
source

, ServiceController ( ) , spooler.

0

Source: https://habr.com/ru/post/1707965/


All Articles