Get SharePoint Installation Directory Path
If you need to get the SharePoint Installation Directory Path then you can use the SPUtility.GetGenericSetupPath method. For instance if you needed to get the path to a features directory to load some XML you could use the following syntax:
string FeaturesPath = SPUtility.GetGenericSetupPath(@”TEMPLATE\FEATURES\” + FeatureName)
The SPUtility Class is full of static methods for assisting you in your SharePoint Development.