Здравствуйте, Аноним, Вы писали:
А>Здраствуйте.
А>Требуется переустановить службу после перезапуска. А>Для этого потребуется установить её в Manual, после перезапуска компьютера сменить службу и вновь поставить Auto. А>Вопрос в том, каким образом можно в dotnete-е перевести службу в ручной режим работы? А>При этом больше ничего изменяться не должно.
Судя по МСДН:
Set the StartType to specify either that the service start automatically after reboot, or that a user must manually start the service. A service can also be disabled, specifying that it cannot be started, either manually or programmatically, until it is enabled.
You cannot change ServiceInstaller property values after installation. To change the StartType, you either have to uninstall and reinstall your service, or manually change the setting using the Service Control Manager.
Как вариант изменить ключ в реестре: HKLM\System\ControlSet001\Services\YourServiceName\Start