Archive: Set service to manual instead of automatic


Set service to manual instead of automatic
How can this be achieved during installation-time. I have several services with their own parameters to start, stop, install, uninstall, etc.

But installing the service sets it to automatically startup.

Is there a way to set it to manual by default

Cheers Chris


Call the ChangeServiceConfig API using the System plug-in (you can find a tutorial in the users manual).

MSDN info:

http://msdn.microsoft.com/library/de...viceconfig.asp


You will also need to call some other Service API functions such as OpenSCManager(), OpenService(), and CloseServiceHandle() and optionally you would also need to call LockServiceDatabase() and UnlockServiceDatabase(). This would be much easier in a plugin, and if it would be useful to be able to control some of the attributes configurable using ChangeServiceConfig() and ChangeServiceConfig2() I can add support for this to the services plugin that I maintain.