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:
Post a Comment