Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows API call "RegGetValueW" returned error code: 0

I am getting Windows API Call Error Code : 0

I have installed SSMS 2018 and was trying to find out if I have any other versions installed. For that I ran sqllocaldb versions in CMD but got the following message:

Windows API call "RegGetValueW" returned error code: 0.

When I checked manually (via Control Panel), I saw that I have 2015 and 2016 versions installed. So Why it are they not showing in CMD.

I tried to find other solutions but found nothing that made sense to me.

like image 731
Ravi Avatar asked Jun 25 '19 19:06

Ravi


Video Answer


1 Answers

This post helped me: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/1257bf26-6ab0-416d-bf26-34f128f42248/sql-2016-sp1-sqllocaldb-versions-errors-with-quotwindows-api-call-quotreggetvaluewquot?forum=sqlexpress

In registry change catalog name in

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Local DB\Installed Versions

to match the version listed in

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL13E.LOCALDB\MSSQLServer\CurrentVersion

I my case I had to change from 13.0 to 13.1.

like image 168
daniell89 Avatar answered Sep 17 '22 10:09

daniell89