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

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:

if(!Ispostback)
{
  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?

share|improve this question

1 Answer 1

Search through the registry.

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

share|improve this answer
    
mit.Visible=GetInstalledApps(); from above mentioned link. Thank you very much Robban1980. –  shakizat Aug 15 '12 at 4:30
    
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 Aug 15 '12 at 4:46

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.