I have found one another solution under https://www.youtube.com/watch?v=x9pq3fUOO3s that worked for me when I faced problems with ODBC Driver 17 installation while updating
Microsoft SQL Server.
It basically requires cleaning the value of PendingFileRenameOperations
(replacing the multi-string value with an empty string) under the registry key Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
.