I created a simple windows service. And added setup project to this solution. I could build service and setup project successfully. Also after build I could use the MSI file created successfully. I could install windows service successfully and could achiev the functionality.
But now I want to uninstall the service and from Add/Remove programs I am removing this service. The service is uninstalled from Add/Remove programs. But still I can see the service in the list of Service. Do I need to add anything while creating the setup for windows service?
When you create a setup project you can set external commands to run before installation:
SetupProject
from visual studio and select "custom actions" from the view.