Reputation: 11
I have created a setup project in visual studio 2010 which contains windows service & wpf exe. Installer is working good and without any issue.
The issue occurs when user try to install application again using MSI. Currently, it come up with screen with 2 options "Repair" & "Remove". Remove option works for us. When I try to repair the installed application it got stuck with an error says "Service is already running" & install state of application got deleted, so we cant able to uninstall the application also.
Is there any way to remove repair option from msi setup?
Upvotes: 1
Views: 1047
Reputation: 20790
You can't really remove Repair from a Windows Installer setup, especially in one generated by Visual Studio. Whatever you do, for example, you cannot remove the right-click Repair option on the MSI file. You should fix the underlying issue, which is that (a guess) you have code in a custom to start a service which does not use a completely correct condition on the call. Either that or the code assumes that it will only ever be called when the service has just been installed and is not running.
In other words this is an XY problem because the actual issue appears to be some code that should check that the service is already installed and running (either with custom action conditions or code) but you are asking how to implement your proposed solution of getting rid of a Windows Installer feature.
Upvotes: 1