How to find the installation date for an sql server installation default or named instance?
Now I use XP_regread @rootkey='HKEY_LOCAL_MACHINE', @key='SOFTWARE\Microsoft\MSSQLServer\setup',
@value_name='SQLPath',
@value = @root OUTPUT
To output the SQLPath and then use xp_getfiledetails to have details about this folder. But by named instances these registry keys are different.