Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

"Specified service already exists" while patching

Posted on 2008-09-30
4
Medium Priority
?
821 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 1500 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Invest in your employees with these five simple steps to improve employee engagement and retention.
Have you ever run into that annoying problem where the computer won't boot?  Wouldn't it be great if you had a tool that would make that disk boot again?  I have found one tool that works more often than not ...
Viewers will learn how to use the Hootsuite Dashboard.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

636 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