Friday, May 17, 2013

Get 14 Hive Path Programmatically In C# ( SharePoint 2010)

Use simple one liner code to get 14 hive path using C#:
string setupPath = SPUtility.GetGenericSetupPath(string.Empty);

Method is included in Utilities namespace:
using Microsoft.SharePoint.Utilities;

Above method will return C:\Program Files\Common files\Microsoft Shared\Web Server Extensions\14

Contact Me or post a comment for any technical help related with SharePoint 2010.

No comments: