use master
GO
exec xp_regread ‘HKEY_LOCAL_MACHINE‘,‘SOFTWARE\Microsoft\Microsoft SQL Server\110\Tools\Setup‘,‘ProductCode‘
exec xp_regread ‘HKEY_LOCAL_MACHINE‘,‘SOFTWARE\Microsoft\Microsoft SQL Server\110\Tools\Setup‘,‘DigitalProductId‘
GO