Solved

"Specified service already exists" while patching

Posted on 2008-09-30
4
804 Views
Last Modified: 2013-12-12
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
Comment
Question by:eXpedo
  • 2
4 Comments
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 500 total points
ID: 22614301
> 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
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 22622194
>>>> "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
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 22623210
itsmeandnobodyelse, normally visual studio setup successfully takes case of all this, including stopping.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
If you don't know how to downgrade, my instructions below should be helpful.
This video demonstrates how to use each tool, their shortcuts, where and when to use them, and how to use the keyboard to improve workflow.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now