Unable to uninstall OpenFlows software

Product(s): WaterGEMS, WaterCAD, HAMMER, SewerGEMS, SewerCAD, StormCAD, CivilStorm, PondPack, FlowMaster, CulvertMaster
Version(s): All
Area: Installation


How can I resolve a "stuck" installation, where it is not possible to uninstall?

When trying to upgrade or reinstall the software, the installation states that the software or a previous version of it is already installed and must be uninstalled first before proceeding, but then fails with an error such as "1605", and the program does not appear in the "add or remove programs" or "programs and features" list. 

Other symptoms include:

"This action is only valid for products that are currently installed"

"Error 1603" or "Error 1605"

"Failed (1605)"

Error 0x81f40001


"Error 1605" and "error 1603" are Windows Installer errors which may occur if the particular component is in use or cannot be changed. First, try rebooting the computer, closing all open applications (including Windows Updates if present), then try again.

If the software needs to be reinstalled, but fails with an error or is not listed as a program to be uninstalled, you may need to manually clean out the related entries in the Windows Registry, along with deleting the installation folder. This situation can occur for example if the user's Windows profile became corrupted and was recreated. 

Error 0x81f40001 indicates that the computer likely needs to be restarted (rebooted) first before uninstallation can proceed.

Option 1 - registry cleanup utility

First, try using an installation cleanup utility to attempt to remove the software. Some examples include:

1) Microsoft's Fix-it tool for installation cleanup



2) IObit Uninstaller (free - use a web search to find the latest version)

If you are able to successfully remove the software using one of the above utilities, locate and delete the installation folder for the product before attempting to reinstall. You may also need to clean out other folder locations per this article.

Option 2 - manual registry clean

If the above does not work, you may need to remove the Registry key that tells the installation program that the software is still installed from the registry.

Important Note: Microsoft says "Serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry... view the article in the Microsoft Knowledge Base: http://support.microsoft.com/kb/322756"

Note: you will need to have administrative permissions to edit the Registry in order to follow these steps. Please contact your IT/Helpdesk if unsure.

  1. Select Start > Run or press Windows key + R

  2. Type "regedit" into the Run dialog, click OK.

  3. In the resulting Registry Editor, expand the tree in the left pane to find the following key (icon will appear as a folder) HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

    Note: For 32-bit applications installed on 64-bit Windows, the following key may need to be substituted: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
  4. Export this key in case it needs to be restored. This is done by right clicking the icon for the "Uninstall" key then selecting Export.

  5. Use the Find tool to search for the name or part of the name of the software.

  6. When a key is found, confirm the key is for the correct application by checking the values for DisplayName, DisplayVersion, and InstallLocation. If the key seems to be for a different application, press F3 to find the next key.

  7. After confirming the correct key is currently displayed in the right hand pane, right click the icon that looks like an open folder in the left pane, then select Delete.

  8. Press F3 (Find Next) to make sure no other relevant keys remain in the parent "Uninstall" key.

If the above does not work, follow these steps to clean out additional information from the registry:

  1. Open Regedit per steps 1-2 above
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\ and perform a search for the product name. FlowMaster is used an example in the screenshot below:
  3. Note the long string of characters in the folder (hive) name. Copy this to clipboard.
  4. Delete the folder (the one within the above registry location containing the product name)
  5. Search for and remove any other registry entries with folder name the same as the unique ID from step 3 above

If you are able to successfully remove the software using the above method, locate and delete the installation folder for the product before attempting to reinstall. You may also need to clean out other folder locations per this article.

Option 3

If the installation still fails, try manually installing the errant component. For example, if installation fails on installing Microsoft .NET Framework 3.5 SP1, close the installation, download the required .NET Framework version from Microsoft's website, and try installing that first. Other prerequisites like the Visual C++ Redistributable are also available from Microsoft.

For other components, and if you're not sure where to find them, try extracting them manually from the installation file. To do this, open the installation executable file with a compression utility such as Winrar. (note that this is only possible with V8i and below) Inside, you will see the Setup.msi file along with all the other prerequisites.  After extracting all the files follow the directions in the wiki below to uninstall any previous WaterGEMS files that may be left.  Next run all the other prerequisites followed by your setup file separately. .NET frameworks should be installed in ascending numerical order. If you're using Windows 7 or Vista, you may need to right-click on the installation file and choose "Run as Administrator".

In order to accomplish this in the CONNECT Edition and greater, you will need to first run the installation executable and wait for it to load the initial screen. Once the initial installation screen appears, navigate to your Windows temp folder (%temp% in the File Explorer address bar) and you should be able to find the individual components by sorting the contents by modified date. 

If all of the prerequisites are installed successfully but the installation fails during the process of installing the main program you can locate the Setup.MSI file per the previous paragraph and try running that.

If the same error still occurs, try booting the computer in Safe Mode, to ensure that any potentially interfering processes are not running.

See Also

How do I perform a clean uninstall and reinstall of the Hydraulic and Hydrology products?

Error installing WaterGEMS or WaterCAD: Incorrect function

Cannot uninstall software