Installing SQL 2017 express using command prompt Fails

Rathod, Shashi 21 Reputation points


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

    Hi @Rathod, Shashi ,

    Could you attach your detail or summary txt file here?
    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
    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:

    Best regards,

    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