Errors Installation

Sitecore Corrupted Instance Manual Uninstall

Sitecore as done a great job being flexible in the way it can be installed, which allows us developers customize it exactly the way we like it best. To kick off, let’s look at the ways we can install Sitecore:

  • Sitecore Installation Wizard – a Sitecore installer executable, traditionally downloaded from sdn.sitecore.net and run with admin privileges
  • Sitecore Instance Manager – a lightweight program that can be downloaded from Sitecore Marketplace and used for installing specific CMS instances and preferred modules
  • Sitecore Rocks – Visual Studio plugin that makes developers’ life happy!
  • Scripted Install – some partners create new Sitecore installations on daily basis for breakfast, lunch, and dinner, thus, it makes sense to write a custom PowerShell or similar script that automates the manual steps would need to be taken to install Sitecore from an archive, which can also be downloaded from sdn.sitecore.net
  • Manual Install – this is a preferred method by all who like to be in control, it’s very much less intrusive and transparent than other options.

This article focuses on the first option, which seems to be the most popular choice for those just starting with Sitecore. Personally, tend to avoid it as much as possible, due to its intrusive and messy nature. Instead of reinventing a wheel and going over the installation process, which Sitecore has described in detail in multiple installation documents documents, the blog focuses on uninstalling Sitecore that was installed using the executable installer, and in particular about problematic installs that cannot be pulled out of the operating system by simply using the same installer or Windows Programs and Features uninstall feature.

Stecore Installation Error -  Instance Exists

Stecore Instance Exists Error

Way too often after installing Sitecore, we end up changing the filesystem permissions and moving files and databases around. Such modification, unfortunately, result in errors, when trying to uninstall the CMS via Windows Programs and Features. A natural reaction to these errors is to manually uninstall the instance, which would include:

  1. Deleting the IIS website instance in the IIS Manager
  2. Deleting the databases used by the instance
  3. Deleting the root folder in the filesystem

Unfortunately, that still leaves the Sitecore instance in the list of installed programs, forcing developers to use a different name for a replacement instance, eventually creating a list of fake Sitecore instances in Programs and Features. Fortunately, there is a very easy fix for this. Let’s take a look at the issues one would run into, while trying to install a Sitecore instance after completing the three steps above:

  1. The name you entered is not unique.Reason: Sitecore executable installer creates a registry entry under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Sitecore CMS that is used to display information in Windows Programs and Features, the contents of this key are also checked during the installation process and if a child key with the same key as the one being installed is found, the above error message is shown.Workaround: Simply delete the registry key containing the information about the previously installed instance under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Sitecore CMS.
  2. Failed to execute SQL string, error detail: Unable to open the physical file {path to SQL files}Reason: Sitecore installer checks the user temp directory with the same instance name for database files, and if found, seems to not copy them into the {root}\Databases folder. This seems a bit cheap to me personally; it seems that checking the actual location where the MDF and LDF files would be copied to would make more sense.Workaround: Delete the instance folder under C:\Users\{username}\AppData\Local\Temp\ .

    Sitecore Registry Key

    Sitecore Registry Key

Once both workarounds have been implemented, the previous Sitecore installation listing should be gone from  Windows Programs and Features and the subsequent install of a new instance with the same name should succeed.

Please keep in mind that the above steps do not completely remove the Sitecore installer’s footprint on the operating system. For the extra curious, here is a registry snapshot comparison outlining the changes caused by the installer (and whatever other processes were running at that time) created by RegShot: Sitecore install registry footprint

*** The above procedure and the registry snapshot has been tested in Windows 8.1 with Sitecore 7.1 rev.130926.


5 comments on “Sitecore Corrupted Instance Manual Uninstall
  1. DylanMcCurry on said:

    Thanks for writing this up, Vasiliy! Happens to me occasionally, and it’s always a pain to remove a bad instance.

Leave a Reply

Your email address will not be published. Required fields are marked *