Distribution setup SQL Server Agent error: “RegCreateKeyEx() returned error 5, ‘Access is denied.'” …

In the Configuration Distribution Wizard, the “Configure SQL Server Agent Auto-Start” step has the following text error:

TITLE: Configure Distribution Wizard
------------------------------
An error occurred configuring SQL Server Agent.
------------------------------
ADDITIONAL INFORMATION:
RegCreateKeyEx() returned error 5, 'Access is denied.' (Microsoft SQL Server, Error: 22002)

This is a very minor error that is not difficult to fix. The wizard is trying to change the “startup mode” of the SQL Server proxy service to “automatic”. You can do this with the SQL Server Configuration Manager

In the Sysinternals process monitor, you may see: Operation:RegCreateKeyResult:AccessDeniedPath: “HKLM\System\CurrentControlSet\Services\SQLAgent$SQL2012 “If you encounter this error, please refer to the Configuration Distribution Wizard’s “Select “No” on the SQL Server Agent Startup page (shown below) and set your agent service to auto-start mode through SQL Server Configuration Manager.

 

Read More: