Archive: disabling an automatic service for installation


disabling an automatic service for installation
I need to disable a service prior to unregistering, stopping and replacing. Is there a system call for a disable and subsequent re-enable of automatic service in windows?

mdm


disable? what do you mean by disable? do you mean you want to stop it starting automatically when the system starts?


I mean that I have a service whose startup type is set to automatic; it is availible to the network. I want to reset service to disable, do my install, and then reset again to automatic to make availible to network again. I hope that clarifys.

thanks,
mdm


Turning it from Automatic to Disable doesn't stop the service. It seems you should be wanting to stop the service, install, then start the service.


The best I can offer right now (I'm a little tired/drunk ;)) is to point you in the direction of a plugin for NSIS I wrote a long time ago. It might not solve all of your issues but it will help and I or others will get you all the way pretty quickly, have no fear ;)

http://nsis.sourceforge.net/archive/...rvices.dll.zip


The thought here is that prior to stopping service, I want to make the service inaccessible to the network...so that I don't interrupt someone who's in the middle of using service. Admittedly either way I'm going to bum someone out, but this may be a better way to do that?

mdm


That won't make any difference, you will always have to stop the service so users can't use it anymore.


Yes, but I don't want users to be able to start or stop services while I'm running installer...

mdm