Solved

"Specified service already exists" while patching

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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
All of the resources available today make learning a new digital media easier than ever-- if you know where to begin. This is a clear, simple guide to a few of the basic digital art mediums and how to begin learning them on your own.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

809 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