SQL Server 2022 Express - trying to increment registry key failed

Christian Smith 0 Reputation points
2024-09-04T21:54:27.57+00:00

I've been banging my head against this for a few days now. Every time I try to install SQL Server 2022 Express, it ends with a message saying "trying to increment registry key 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls\hadrres.dll' failed. Please check if registry key is accessible." I have tried installing it as admin, I've followed the standard instruction for a clean uninstall (removing all instances of SQL from the programs list as well as applicable registry entries), and nothing seems to make a difference. Weirdly, when I try to access the SharedDlls registry key, RegEdit freezes up and I can't go any further, which leads me to believe this may actually be a registry issue. I've included the installation summary as well as a screenshot of the error below.

2024-09-04 14_40_18-SQL Server 2022 Setup

Overall summary:

Final result: Failed: see details below

Exit code (Decimal): -2058616831

Start time: 2024-09-04 14:33:40

End time: 2024-09-04 14:40:34

Requested action: Install

Setup completed with required actions for features.

Troubleshooting information for those features:

Next step for SQLEngine: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.

Next step for Replication: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.

Machine Properties:

Machine name: PINKFROSTY

Machine processor count: 12

OS version: Microsoft Windows 10 Home (10.0.19045)

OS service pack:

OS region: United States

OS language: English (United States)

OS architecture: x64

Process architecture: 64 Bit

OS clustered: No

Product features discovered:

Product Instance Instance ID Feature Language Edition Version Clustered Configured

Package properties:

Description: Microsoft SQL Server 2022

ProductName: SQL Server 2022

Type: RTM

Version: 16

SPLevel: 0

Installation location: C:\SQL2022\Express_ENU\x64\setup\

Installation edition: Express

Product Update Status:

None discovered.

Notice: Please read Microsoft SQL Server Software License Terms at aka.ms/useterms.

User Input Settings:

ACTION: Install

ADDCURRENTUSERASSQLADMIN: true

AGTSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE

AGTSVCPASSWORD: *****

AGTSVCSTARTUPTYPE: Disabled

ASBACKUPDIR: Backup

ASCOLLATION: Latin1_General_CI_AS

ASCONFIGDIR: Config

ASDATADIR: Data

ASLOGDIR: Log

ASPROVIDERMSOLAP: 1

ASSERVERMODE: TABULAR

ASSVCACCOUNT: <empty>

ASSVCPASSWORD: <empty>

ASSVCSTARTUPTYPE: Automatic

ASSYSADMINACCOUNTS: <empty>

ASTELSVCACCT: <empty>

ASTELSVCPASSWORD: <empty>

ASTELSVCSTARTUPTYPE: 0

ASTEMPDIR: Temp

AZUREARCPROXYSERVER:

AZUREBILLEDEDITION:

AZUREREGION:

AZURERESOURCEGROUP:

AZURESERVICEPRINCIPAL:

AZURESERVICEPRINCIPALSECRET: *****

AZURESUBSCRIPTIONID:

AZURETENANTID:

BROWSERSVCSTARTUPTYPE: Disabled

CONFIGURATIONFILE:

ENABLERANU: true

ENU: true

EXTSVCACCOUNT: <empty>

EXTSVCPASSWORD: <empty>

FEATURES: SQLENGINE, REPLICATION

FILESTREAMLEVEL: 0

FILESTREAMSHARENAME: <empty>

FTSVCACCOUNT: <empty>

FTSVCPASSWORD: <empty>

HELP: false

IACCEPTSQLSERVERLICENSETERMS: true

IACKNOWLEDGEENTCALLIMITS: false

INDICATEPROGRESS: false

INSTALLSHAREDDIR: C:\Program Files\Microsoft SQL Server\

INSTALLSHAREDWOWDIR: C:\Program Files (x86)\Microsoft SQL Server\

INSTALLSQLDATADIR: <empty>

INSTANCEDIR: C:\Program Files\Microsoft SQL Server\

INSTANCEID: SQLEXPRESS

INSTANCENAME: SQLEXPRESS

ISMASTERSVCACCOUNT: NT AUTHORITY\Network Service

ISMASTERSVCPASSWORD: <empty>

ISMASTERSVCPORT: 8391

ISMASTERSVCSSLCERTCN: <empty>

ISMASTERSVCSTARTUPTYPE: Automatic

ISMASTERSVCTHUMBPRINT: <empty>

ISSVCACCOUNT: NT AUTHORITY\Network Service

ISSVCPASSWORD: <empty>

ISSVCSTARTUPTYPE: Automatic

ISTELSVCACCT: <empty>

ISTELSVCPASSWORD: <empty>

ISTELSVCSTARTUPTYPE: 0

ISWORKERSVCACCOUNT: NT AUTHORITY\Network Service

ISWORKERSVCCERT: <empty>

ISWORKERSVCMASTER: <empty>

ISWORKERSVCPASSWORD: <empty>

ISWORKERSVCSTARTUPTYPE: Automatic

NPENABLED: 0

PBDMSSVCACCOUNT: <empty>

PBDMSSVCPASSWORD: <empty>

PBDMSSVCSTARTUPTYPE: 0

PBENGSVCACCOUNT: <empty>

PBENGSVCPASSWORD: <empty>

PBENGSVCSTARTUPTYPE: 0

PBPORTRANGE: <empty>

PID: *****

PRODUCTCOVEREDBYSA: false

QUIET: false

QUIETSIMPLE: false

ROLE: AllFeatures_WithDefaults

SAPWD: *****

SECURITYMODE: SQL

SQLBACKUPDIR: <empty>

SQLCOLLATION: SQL_Latin1_General_CP1_CI_AS

SQLMAXDOP: 0

SQLMAXMEMORY: 2147483647

SQLMINMEMORY: 0

SQLSVCACCOUNT: NT Service\MSSQL$SQLEXPRESS

SQLSVCINSTANTFILEINIT: false

SQLSVCPASSWORD: <empty>

SQLSVCSTARTUPTYPE: Automatic

SQLSYSADMINACCOUNTS: PINKFROSTY\Bazooka Joe

SQLTELSVCACCT: NT Service\SQLTELEMETRY$SQLEXPRESS

SQLTELSVCPASSWORD: <empty>

SQLTELSVCSTARTUPTYPE: Automatic

SQLTEMPDBDIR: <empty>

SQLTEMPDBFILECOUNT: 1

SQLTEMPDBFILEGROWTH: 64

SQLTEMPDBFILESIZE: 8

SQLTEMPDBLOGDIR: <empty>

SQLTEMPDBLOGFILEGROWTH: 64

SQLTEMPDBLOGFILESIZE: 8

SQLUSERDBDIR: <empty>

SQLUSERDBLOGDIR: <empty>

SUPPRESSPAIDEDITIONNOTICE: false

SUPPRESSPRIVACYSTATEMENTNOTICE: false

TCPENABLED: 0

UIMODE: AutoAdvance

UpdateEnabled: true

UpdateSource: MU

USEMICROSOFTUPDATE: false

USESQLRECOMMENDEDMEMORYLIMITS: false

Configuration file: C:\Program Files\Microsoft SQL Server\160\Setup Bootstrap\Log\20240904_143340\ConfigurationFile.ini

Detailed results:

Feature: Database Engine Services

Status: Failed

Reason for failure: An error occurred during the setup process of the feature.

Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.

Component name: SQL Server Database Engine Services Instance Features

Component error code: 0x854C0001

Error description: Trying to increment registrykey 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls\hadrres.dll' failed. Please check if registry key is accessible.

Error help link: https://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=16.0.1000.6&EvtType=0x21C1C994%400xAC7B1A58%401233%401450&EvtType=0x21C1C994%400xAC7B1A58%401233%401450

Feature: SQL Server Replication

Status: Failed

Reason for failure: An error occurred for a dependency of the feature causing the setup process for the feature to fail.

Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.

Component name: SQL Server Database Engine Services Instance Features

Component error code: 0x854C0001

Error description: Trying to increment registrykey 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls\hadrres.dll' failed. Please check if registry key is accessible.

Error help link: https://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=16.0.1000.6&EvtType=0x21C1C994%400xAC7B1A58%401233%401450&EvtType=0x21C1C994%400xAC7B1A58%401233%401450

Feature: SQL Browser

Status: Passed

Feature: SQL Writer

Status: Passed

Feature: Setup Support Files

Status: Passed

Rules with failures or warnings:

Global rules:

Warning IsFirewallEnabled The Windows Firewall is enabled. Make sure the appropriate ports are open to enable remote access. See the rules documentation at https://go.microsoft.com/fwlink/?linkid=2162127 for information about ports to open for each feature.

Rules report file: C:\Program Files\Microsoft SQL Server\160\Setup Bootstrap\Log\20240904_143340\SystemConfigurationCheck_Report.htm

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,461 questions
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,663 questions
{count} votes

2 answers

Sort by: Most helpful
  1. CathyJi-MSFT 21,861 Reputation points Microsoft Vendor
    2024-09-05T02:16:26.3266667+00:00

    Hi @Christian Smith

    Weirdly, when I try to access the SharedDlls registry key, RegEdit freezes up and I can't go any further, which leads me to believe this may actually be a registry issue. 

    Did you meant that the registry editor has stopped working? If so, please follow below steps to resolve this issue. Enable the Registry Editor via the LGPE:

    • Press Win + R to launch the Run command dialog box.
    • Type gpedit.msc and press OK to open the Local Group Policy Editor.
    • Navigate to User Configuration > Administrative Templates > System.
    • Double-click the Prevent access to registry editing tools option on the right-hand side pane.
    • In the next window, select the Disabled or Not configured option. Finally, click Apply, click OK, and then restart your device to save these changes. 

    Refer to blog 7 Ways to Fix the Windows Registry Editor When It Won’t Respond.

     

    Every time I try to install SQL Server 2022 Express, it ends with a message saying "trying to increment registry key 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls\hadrres.dll' failed.

     

    Please follow below steps to uninstall cleanly and reinstall SQL. 

    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
    7. Download the SQL server 2022 setup from the MS link, reinstall SQL server as admin account, choose download media option to get the iso file, run the setup.exe file as admin.

     In addition, there is some limit of Express edition, such as without SQL server agent. SQL server developer is a better choose, it is also free.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it.

    0 comments No comments

  2. Erland Sommarskog 110.2K Reputation points
    2024-09-05T21:19:36.06+00:00

    Weirdly, when I try to access the SharedDlls registry key, RegEdit freezes up and I can't go any further, which leads me to believe this may actually be a registry issue.

    That certainly sounds like a suspect. What anti-malware software do you have? If you have something else than Windows Defender, I would hold that as the prime suspect. Some anti-malware programs guards certain registry keys. (Although, this appears like an odd one to look down.)

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.