How do you programmatically turn off the Windows XP Print Spooler service in C#
-
I need to write a small console app (patch) that turns off the print spooler service, does a few things, then starts the print spooler service. I'd like to write this in C#. Can someone point me in the right direction? Thanks in advance!
-
Answer:
You can probably do that using the ServiceController class : ServiceController controller = new ServiceController("Spooler"); controller.Stop(); ... controller.Start();
MikeW at Stack Overflow Visit the source
Other answers
net start spooler net stop spooler http://www.tech-recipes.com/rx/864/windows-service-managing-through-command-line/
Chris Ballance
I suspect you use the ServiceController class to control (i.e. to stop and start) the service whose name is spooler.
ChrisW
Related Q & A:
- How do you connect Outlook Express to Windows XP?Best solution by Yahoo! Answers
- How do I fix "print spooler?Best solution by Yahoo! Answers
- How do I start the print spooler on my XP?Best solution by Yahoo! Answers
- How do I fix print spooler?Best solution by Yahoo! Answers
- How do you get to paintbrush in Windows XP?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.