Search code examples
.netmosssharepoint-2007

Determine which edition of SharePoint is Installed?


What is the most reliable way to determine which version of SharePoint is installed. Whether it is WSS or MOSS. If MOSS, whether it is standard or enterprise.

I want to programmatically detect the exact SharePoint version installed..

PS: I already have posted this question at SharePoint.SE but could not find a convincing answer.


Solution

  • You could try to use SPFarm.Local.BuildVersion or SPWebService.ContentService.Farm.BuildVersion (from this previous question) and to build a lookup table based on this: How to find the level of SharePoint you are running?

    Another option is to read directly from ConfigDB database, on Versions table; you can find more information here.