I already had SQL Server 2019. After upgrading my Windows 10 to latest October Update, I found my SQL Server does not have latest service packs. I downloaded latest service pack CU8 from Microsoft and ran it. After initializing set up, I get error
Attempted to perform an unauthorized operation
Many research and no luck even in SO.
Please advise.
After reviewing the logs and digging into windows registry and security, I found the problem was "Microsoft Edge" registry key. Somehow it is read-only for administrator and I figured it out I need to use SYSTEM account to apply the service pack.
Finally I found I can do that using an executable in SysInternals package which is famous for doing weird things in Windows.
This is what I did to apply the service pack.
.\PsExec64.exe -sid "D:\Downloads\SQLServer2019-KB4577194-x64.exe"
This way you will execute the service pack using SYSTEM account which has highest privilege.
Service pack installed successfully!