Solved

"Specified service already exists" while patching

Posted on 2008-09-30
4
818 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 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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

In our personal lives, we have well-designed consumer apps to delight us and make even the most complex transactions simple. Many enterprise applications, however, are a bit behind the times. For an enterprise app to be successful in today's tech wo…
This article was originally published on Monitis Blog, you can check it here . If you have responsibility for software in production, I bet you’d like to know more about it. I don’t mean that you’d like an extra peek into the bowels of the sourc…
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

729 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