I am using C# programming language and want to define whether Office Web Apps installed on server in order to hide/show MenuItemTemplate

My variant is as follows:

  bool b = File.Exists(@"C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server     Extensions\\14\TEMPLATE\\LAYOUTS\\WordViewer.aspx"); 
  mit.visible=b;      //  mit- means <SharePoint:MenuItemTemplate>

but I need something else... what is the correct method?

1 Answer 1


Search through the registry.

Here is one example from Stackoverflow: https://stackoverflow.com/questions/908850/get-installed-applications-in-a-system

  • mit.Visible=GetInstalledApps(); from above mentioned link. Thank you very much Robban1980.
    – shakizat
    Commented Aug 15, 2012 at 4:30
  • 1
    I changed Method to bool and here code snippet { { using (RegistryKey sk = rk.OpenSubKey(skName)) { string s= (string)sk.GetValue("DisplayName"); if(s=="Microsoft® Office Web Apps") { return true; } }} return false; }
    – shakizat
    Commented Aug 15, 2012 at 4:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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