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!
Perhaps you can do this with the ServiceController class:
ServiceController controller = new ServiceController("Spooler"); controller.Stop(); ... controller.Start();
net start spooler net stop spooler
http://www.tech-recipes.com/rx/864/windows-service-managing-through-command-line/
, ServiceController ( ) , spooler.
ServiceController
spooler
Source: https://habr.com/ru/post/1707965/More articles:Oracle, causing PL / SQL problems from SQL-Plus x.sql, says my_function "cannot be a function", - functionSolrj Query - сначала введите наиболее релевантную запись - schemaHow to redirect the console (stin, sterr) in Delphi 2009? - delphihttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1707963/lots-of-boolean-flag-inputs-to-a-class&usg=ALkJrhgGB2GoXIJGfTMYc_5FicP68k6JeAТоксинирование оставшихся данных с помощью lex/yacc - pythonTransferring data between flex components - flexList of all files that were not edited during the year in CVS - version-controlhow you execute a function in a list of objects using LINQ - foreachThe request for svn revision suddenly seems slow (so how can svn 1.5 be?) - svnDelete duplicate SQL records - sqlAll Articles