First, here are the recommended steps to manually uninstall SQL 2005:

http://support.microsoft.com/kb/909967

If that doesn't work, this is how you can manually uninstall all versions of SQL 2005 so that SQL can be reinstalled: .

Note - This method will delete all databases and configuration, you must have a backup of your existing SQL databases (which this uninstall will delete) before proceeding. (Again, this is not supported, please call Microsoft PSS for supported methods)

  1. Uninstall all SQL components possible in Add/Remove Programs (including the SQL client and VSS writer)
  2. Stop all SQL Services and configure them to disabled using Start > SQL Configuration Manager
  3. Delete the following registry to get rid of the services.  If you have multiple instance installed, it will be Keyname$Instance (i.e. MSSQLServer$OFFICESERVERS)
    1. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLServer
    2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SQLServerAgent
    3. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLServerADHelper
    4. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ReportServer
    5. Verify that the services do not exist in the SQL Configuration Manager.
  4. Delete the SQL Configuration in the registry
    1. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer
    2. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server
    3. Note - if you installed a 32 bit version of SQL on 64 bit version of Windows, you will need to also delete them from the 32 bit registry node that is redirected. More Info MS 896459.
      * HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432node\Microsoft\MSSQLServer
      * HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432node\Microsoft\Microsoft SQL Server
  5. Delete the SQL Program files - Note this will also delete the existing databases on the system that must be restored from backup.
    1. Delete the directory: C:\Program Files\Microsoft SQL Server
      Note - if you installed a 32 bit version of SQL on 64 bit version of Windows, you will need to also delete them from the 32 bit program files:
      C:\Program Files (x86)\Microsoft SQL Server
    2. You might need to reboot to close all files before you can delete the directory.

Now you can reinstall a clean 32 bit or 64 bit SQL without errors.