In our project we have a chicken/egg problem where during the first installation of our product we want to create the service but we don't want to start it. This is due to customer configuration that is needed on a settings file that after first installation, does not get changed on subsequent upgrades. So during any upgrade we want to stop, upgrade the software (not overwrite settings file), start the service but only on upgrade, never first installation. I don't see away to do this.
The only way I can see would be to on install NOT start the service and then have custom actions on upgrade that do:
1) sc.exe stop "myCustomService"
2) run upgrade
3) sc.exe start "myCustomService"