Windows Sync Manager shows error message "Microsoft SQL Server could not save the security changes" when specifying user/password for publisher/distributor

Symptoms

In pull subscriptions, when you use Windows Synchronization Manager to synchronize, it will ask for security information to connect to publisher and distributor. As soon as you click ON on the dialog box, it would show error message

 

Microsoft SQL Server could not save the security changes

 

Cause

Current logged on user does not have adequate permissions over registry entries

 

Resolution

 Collect Process Monitor Logs and you will see ACCESS DENIED for couple of registry keys including the ones belonging to SQL Server. In a specific scenario they were

 Operation  Path  Result  Detail
 RegCreateKey  HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL10.MSSQLSERVER\Replication\Subscriptions\<Subscription>  ACCESS DENIED Desired Access: Write 
 RegCreateKey  HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL10.MSSQLSERVER\Replication\Subscription\<Subscription> ACCESS DENIED  Desired Access: Write
 RegCreateKey  HKLM\SOFTWARE\Description  ACCESS DENIED  Desired Access: Maximum Allowed
 RegOpenKey  HKLM\Software\Microsoft\MSSQLServer\Client\SNI10.0  ACCESS DENIED Desired Access: Write
 RegOpenKey  HKLM\System\CurrentControlSet\Services\WinSock2\Parameters  ACCESS DENIED  Desired Access: All Access
 RegOpenKey HKLM\System\CurrentControlSet\Services\WinSock2\Parameters ACCESS DENIED Desired Access: All Access

 

Ensure that the current logged on account has adequate permissions over these registry keys (or whichever they turn out to be in ProcMon Logs.)