• Thanks Bru,

    It was very helpful to me..for getting the default value made a small change.

    declare @NumErrorLogs int

    exec master.dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorLogs', @NumErrorLogs OUTPUT

    print @NumErrorLogs

    Thanks.......