jabbera / my-vsts-tasks

20 stars 18 forks source link

Request to Provided Uninstall Service Task #18

Closed sanjaymunjal closed 6 years ago

sanjaymunjal commented 6 years ago

Hi, Wondering if you can add Uninstall Service Task. We are trying to use the task in our CI pipeline. During changes we need to the following: Stop Service, Uninstall Service, Replace the Destination Folder with updated Binaries, Install the Service with updated binaries and Start the service.

Current install service task does provide uninstall option but we want to replace the binaries before we install it. Any alternate suggestion will be welcome.

Thanks in advance.

Regards, Sanjay

jabbera commented 6 years ago

Can I ask why? The workflow we have established here is to use the stop task, but at the same time set the startup type to disabled in case of deployment failure.

sanjaymunjal commented 6 years ago

How one can replace the binaries which are being changed as part of the CI/CD Pipeline for a installed windows service? My understanding is that we need to uninstall before we can replace the service binaries and then install it again. For e.g. Service related dlls may changed and during deployment we want to update these. Sorry in case I am missing something here in relation to windows service installation. Thanks in advance.

jabbera commented 6 years ago

You should not need to uninstall to replace binaries. You do need to stop the service however. As I said, we do a stop, copy, re-install (the install task with uninstall checked) and a start for over 100 deployments. Works great.

sanjaymunjal commented 6 years ago

Thanks for you reply. That worked. I misunderstood that in order to update the service, we have to uninstall it. You can close this issue. Thanks a lot.

jabbera commented 6 years ago

Glad I could help!