Reputation:
Avoid windows service installation during installation if it is already exist I am creating windows service which I don't want to Un-installed so how can I avoid or override the existing windows service.
And also put "Not (Installed OR PREVIOUSVERSIONSINSTALLED)" in Custom action condition but still getting service already exists.
Is their any other method to do so by using installer.cs
Thnx in advance
Upvotes: 1
Views: 156
Reputation: 20800
This is a new install, so you don't need Installed in your condition - the product you're installing can't already be installed!
-Not PREVIOUSVERSIONSINSTALLED- should work, so maybe you need to verify that you're actually doing a RemovePreviousVersions upgrade, and you've incremented the Version in the Setup properties and accepted the request to change the codes. It won't work if you are upgrading a per user to a per machine (or vice versa). One will not upgrade the other and PREVIOUSVERSIONSINSTALLED won't be set.
Upvotes: 1