the installed product does not match the installation source(s) error when uninstalling a windows service
The MSI you think is the original probably isn't really. It sounds like you got yourself in a situation where PackageCode ( GUID ) A is installed and now you have an MSI with PackageCode B.
Take the MSI you have and run the following command:
MsiExec.exe /I foo.msi REINSTALLMODE=voums REINSTALL=ALL
This will "recache" the MSI with the updated PackageCode. You should then be able to uninstall either through Add Remove Programs ( Programs and Features ) or with the command
MsiExec.exe /X foo.msi
Comments
-
RKP about 4 years
when I try to uninstall a windows service from the control panel, I am getting error "the installed product does not match the installation source(s), until a matching source is provided or the installed product and the source are synchronized, this action cannot be performed". actually I do have the original MSI file, but I modified some settings in the config file (where it is installed) after installation, so that might have caused it, how can I uninstall it now?
-
RKP over 13 yearsthat worked like a charm, thanks a million. I got frustrated with this issue and was almost thinking of creating a new setup file with a new name for the windows service
-
Christopher Painter over 13 yearsBTW, now would be a great time for me to mention the perils of testing installers on your dev box. It's kind of like going to the rest room in your own back yard. I highly reccomend virtual machines with snapshots for your development and testing. I NEVER install my installs on my own machine until they've gone through a complete release cycle and vetted by QA.
-
Christopher Painter over 13 yearsAlso it sounds like you have a problem with your installer needing to ResolveSource during the uninstall when it probably shouldn't need to. You don't mention how you created the installer so it's difficult to address this problem.
-
RKP over 13 yearsI created the setup file for my windows service using Visual studio 2008. followed the instructions as mentioned in this article msdn.microsoft.com/en-us/library/zt39148a(VS.80).aspx. I have always had issues uninstalling the services, sometimes the service does not uninstall properly from control panel (i.e. the package disappears from add/remove programs, but the service still exists in the console), so I have to use installutil command, sometimes even that doesn't work, it simply disables the service, then I end up rebooting the machine, it was never easy like a button click for me
-
Christopher Painter over 13 yearsYeah, those procedures are all junk. I've cursed MSFT DevDiv for years on the antipattern they created. If I was you, I'd just throw it away and use Windows Installer XML instead. It will work much better.
-
RKP over 13 yearshow the Windows Installer Xml can be used to create setup packages? Is there an article on it?
-
janonimus over 2 yearsFor folks like me that couldn't solve the problem using the answer above, try this: stackoverflow.com/a/3516591/6080047