Link to home
Start Free TrialLog in
Avatar of Paracom_Inc
Paracom_Inc

asked on

Installing a new Windows service version

I have a Windows Service written in C#. I have a setup project for the service that installs the service without issue. The challenge comes when I want to deploy a new version of the service. I have set the RemovePreviousVersions property of the project to true, but I still get an error message at the end of the installation telling me that, "The specified service already exists". In Custom Actions, the primary output for the service assembly is listed under Install, Commit, Rollback and Uninstall. Does this deployment project feature not work for services? Is there something I can do to get the installer to uninstall a previous version if the service already exists? Thanks.
Avatar of surajguptha
surajguptha
Flag of United States of America image

In the onBefore Install event you can write a code that will uninstall the service so that the install might be successfull
ASKER CERTIFIED SOLUTION
Avatar of ripahoratiu
ripahoratiu
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Paracom_Inc
Paracom_Inc

ASKER

Is InstallUtil available on all platforms?
On all Windows platforms that supports .Net