Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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 wonder if SharePoint API can help me find the edition of SharePoint installed!

share|improve this question
    
Convert License Type is not available? –  user13651 Dec 14 '12 at 20:57
add comment

5 Answers 5

up vote 3 down vote accepted

I wrote about this some time ago on my blog.

Basically what you do is check for the availability of a feature that is present in MOSS that is not part of WSS.

Read the whole post for some of the problems we went through, but currently we have settled for the following code.

/// <summary> 
/// Method to find out if a SharePoint installation is MOSS or WSS 3.0 
/// </summary> 
public static bool IsMOSS() 
{ 
    SPFeatureDefinitionCollection features = SPContext.Current.Site.WebApplication.Farm.FeatureDefinitions; 
    if (features["OssNavigation"] != null && features["Publishing"] != null) 
        return true; 
    else 
        return false; 
}
share|improve this answer
    
Thats great but how'd you detect whether its MOSS standard installation or enterprise. –  Faisal Feb 4 '10 at 9:06
    
See Wictor's response below. –  Muhimbi Feb 10 '10 at 10:47
add comment

I could locate my MOSS Edition from Central Administration -> Operations -> Convert License Type (under Upgrade & Migration group).

share|improve this answer
add comment

To check if MOSS Enterprise is installed you could check the features of the Farm SPFarm.Local and FeatureDefinitions and see if the Premium Site Features Stapling is existing.
It has the name of PremiumSiteStapling and the feature id of code>A573867A-37CA-49dc-86B0-7D033A7ED2C8
.

share|improve this answer
add comment

The easiest way IMHO is to run SPDiag.

The snapshot tab will give you all relevant data on servers, hardware and farm -including build number.

Microsoft SharePoint Administration Toolkit v4.0 x86

Microsoft SharePoint Administration Toolkit v4.0 x64

share|improve this answer
    
I want to detect it either by reading registry or using SharePoint API. –  Faisal Feb 4 '10 at 7:57
add comment

An easy way is to look at the SQL server table called "dbo.Versions" in the "SharePoint_config" database.

You will find entries that shows the versions installed. As a general rule, if the version is 3.X only it means WSS only, versions 12.XX is MOSS (usually you will find MOSS and WSS as WSS is prerequisite to MOSS).

To know if it is Standard or enterprise version of MOSS, Go to the Central administration -> Operations-> Enable Enterprise features. This will show you whether it is standard or enterprise.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.