• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 823
  • Last Modified:

"Specified service already exists" while patching

I have created a patch for a windows service installer and am getting the error message: "Specified service already exists" when I run the patch executable.  I am using a 3rd party patching program that basically takes in the old .msi (Version x.y.10) and the new .msi (Version x.y.11) both created with a VS2008 setup project.  I have the required code in the ServiceInstaller class constructor.  I think the problem derives from the fact that if I try to run the new .msi on a system with the product installed from the old .msi , even with the RemovePreviousVersions property set to true in the setup project used to create the new .msi, I get a message telling me to remove the existing version of the product using Add/Remove Programs in the control panel.  This happens because I am not changing the major or minor version of the product between .msi's.  So I guess the most prevalent question here is, what is the best way to go from x.y.10 to x.y.11 without having the user manually uninstall x.y.10?
0
eXpedo
Asked:
eXpedo
  • 2
1 Solution
 
Vadim RappCommented:
> what is the best way to go from x.y.10 to x.y.11 without having the user manually uninstall x.y.10?

Have RemovePreviousVersions = True, which you already have. It should work, including for going from x.y.1 to x.y.2 . Check if productcode has changed.

That the patch did not work is not surprising - would be surprising if it did, considering that patching is quite picky about MSI standards, which visual studio setup projects don't exactly adhere to, and especially with managed custom actions which are not supported at all.
0
 
itsmeandnobodyelseCommented:
>>>> "Specified service already exists"
You normally get that message if you want to install a system service where an older version wasn't removed before.  I don't know how to remove a service by MSI but normally you would call the service from the command line with /delete or /remove option. You also could try

   sc delete <service_name>

what would cause SCM (service control manager)  to deinstall the service. Make sure that the service was stopped before.
0
 
Vadim RappCommented:
itsmeandnobodyelse, normally visual studio setup successfully takes case of all this, including stopping.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now