Installing SQL 2017 express using command prompt Fails

Rathod, Shashi 21 Reputation points
2021-09-21T18:47:11.38+00:00

Hi,

We are trying to install SQL 2017 express on a fresh machine through command prompt but we get following error message,
"The SQL Server registry keys from a prior installation cannot be modified."

Kindly revert on the mentioned issue.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,343 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Seeya Xi-MSFT 16,461 Reputation points
    2021-09-22T03:15:55.643+00:00

    Hi @Rathod, Shashi ,

    Could you attach your detail or summary txt file here?
    Path: https://learn.microsoft.com/en-us/sql/database-engine/install-windows/view-and-read-sql-server-setup-log-files?view=sql-server-ver15
    This will be useful to solve the problem.

    Possible solution:
    Try to stop all SQL services and remove all SQL programs then reinstall SQL Server.
    And before reinstall, please follow the below steps to remove all components of previous installed SQL Server completely:

    1. Remove all SQL Server components from 'Programs and Features'
    2. Backup the registry
    3. Delete the following keys in regedit:
      --HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server
      --HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer
    4. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and delete all the sub-keys referencing SQL Server
    5. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services and delete all the keys referencing SQL Server
    6. Reboot the machine
      In addition, please use an administrator account to reinstall SQL Server on your computer(Right click->run as administrator).

    Here are steps about uninstalling:
    https://learn.microsoft.com/en-us/sql/sql-server/install/uninstall-an-existing-instance-of-sql-server-setup?view=sql-server-2017&tabs=Windows10

    Best regards,
    Seeya


    If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments