• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 180
  • Last Modified:

Uninstall Service that has been removed causes uninstall to end abnormally

Is there any way I can tell the deployment project to ignore the fact that my service is not there during uninstall?

I have a deployment project that installs/uninstalls a service along with other stuff. It does this via Custom Actions entries in the setup project and the ProjectInstaller class in the service project. Somehow the service is gone (how is not the issue here). When I uninstall the product via the Add/Remove Programs option, I get the message :
 An Exception occured while uninstalling ... The specified service does not exist as an installed service.
When I answer the message, the uninstall rolls back. Thus I cannot uninstall my product. Removing it manually is a big pain.

Thank you
0
MikeBroderick
Asked:
MikeBroderick
  • 2
1 Solution
 
surajgupthaCommented:
So you are basically looking for a way by which it can uninstall the other stuff even though the service uninstall is unsuccessfull
0
 
MikeBroderickAuthor Commented:
No. I am looking for a way to tell it to not abend when it tries to delete a service that isnt there.
0
 
surajgupthaCommented:
How about trying to install the windows service using this method
http://www.codeproject.com/cs/library/DynWinServiceInstallUtil.asp

and during uninstall try ignoring the failure in installing the windows service
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now