Uninstalling Windows Service With Deployment Project

R

russ.haley

I have created a small windows service in C# that installs using the
service installer classes and a deployment project. I have been able to
install the service but the uninstallation does not work. The files are
deleted from the application directory but the service is not being
unregistered.

The instructions I found did not indicate any code changes were
necessary, but I have found reference on Google to changing the
CanShutdown property in the service class but the results were the
same. The Installer completes the un-install process, but the service
still exists in the services list and the registry. The service is NOT
running during the unistallation.

Does anyone know what I have missed? There was reference in one posting
to properties called uninstall delete and uninstall shutdown, but I
have not found any other reference to these properties.

I have also seen refrences to using Installutil.exe from the framework
instead of using the service installer class.

Any help on this issue would be grand as I'm somewhat new to installers
and windows services.

Thanks in advance
Russ
 
S

Stephany Young

I suspect that you haven't added the custom action to the Uninstall actions.

You must add the custom action to all 4 actions.
 
R

russ.haley

Do you have a source for this information? Everything I have looked
over failed to mention the need for custom actions at all. I was under
the impression that the ServiceInstaller and ServiceProcessInstaller
classes took care of all that was required?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top