ERROR:
Solution :
Step 1: open CMD with elivated privilages
Step 2: Run the below commands one by one.
C:\>regsvr32 vbscript.dll
C:\>regsvr32 jscript.dll
C:\>regsvr32 jscript.dll
regsvr32 vbscript.dll regsvr32 jscript.dll
USE master
GO
EXEC xp_regread 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\Microsoft
SQL Server\80\Registration','CD_KEY'
GO
References:
http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/
https://gallery.technet.microsoft.com/scriptcenter/Get-SQL-Server-Product-4b5bf4f8