Re[2]: Поставить службу в Manual
От: Аноним  
Дата: 05.02.07 12:30
Оценка:
Здравствуйте, Brn, Вы писали:

Brn>Судя по МСДН:

Brn>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.
Brn>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.

Brn>Как вариант изменить ключ в реестре: HKLM\System\ControlSet001\Services\YourServiceName\Start


Brn>1 — система

Brn>2 — авто
Brn>3 — вручную
Brn>4 — отключено

Спасибо.
В реестре править очень не хотелось бы — мало ли какие могут быть проблемы в дальнейшем.
Возможно с этим справится System.Management.ManagementObject, но найти конкретнее не могу.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.