Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i develop a windows service in C#. and my project has Installer, and Setup project. the setup project, installs service very well and it doesn't have any problem, but when i change project and create other setup, the new setup doesn't install new service, because it's already exist!!! is any way to create setup that it uninstalls the service then install it?
Posted

1 solution

In the "Setup Project"properties (by using Properties window) there is a property named "RemovePreviousVersions", so you have to set it on True.

See details in MSDN[^]
 
Share this answer
 
v2
Comments
Zon-cpp 28-Sep-14 8:43am    
how do i increase the ProductCode value ?
Raul Iloc 28-Sep-14 10:44am    
To change "ProductCode" you have to use the same Properties window and click on this property value (a "..." button), then in the new window click on the button "New Code".
Zon-cpp 28-Sep-14 8:48am    
but the installation has error:

The Specified Service already exists.

i want this installation uninstalls service and installs the new version of service with same name
Raul Iloc 28-Sep-14 10:45am    
The installer checks UpgradeCode and ProductCode properties to determine whether the earlier version should be removed. The UpgradeCode must be the same for both versions; the ProductCode must be different.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900