Solved

how can i check whether MS Excel and MS Access installed in my pc using C#.net window application ??

Posted on 2011-03-01
4
817 Views
Last Modified: 2012-05-11
i want to check whether MS Excel and MS Access installed in my pc using C#.net window application ??

how can i check it ??

give me some suggestions ....
0
Comment
Question by:Parth48
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
crysallus earned 500 total points
ID: 35014696
0
 
LVL 10

Expert Comment

by:Asim Nazir
ID: 35014737
You can do this by checking registry. Here is code:

public enum MSOfficeApplications {     Access,     Excel,     Word }  public bool IsInstalled(MSOfficeApplications app) {    var keyName = String.Empty;    switch (app)    {       case MSOfficeApplications.Access:           regKey = "Access.Application";       case MSOfficeApplications.Excel:           regKey = "Excel.Application";       case MSOfficeApplications.Word:           regKey = "Word.Application";    }     RegistryKey key = Registry.ClassesRoot;    RegistryKey subKey = key.OpenSubKey(keyName);    return not (subKey == null); }

Open in new window

0
 

Author Comment

by:Parth48
ID: 35015299
hi @crysallus:- your web link really helpful to me ...

how can i check the version of the excel and access , whether it's 2003 ,2007 or 2010 ?

for 2007 i have cheched but for 2003 and 2010 i have not checked ...

// for 2007
RegistryKey AccessKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Office\12.0\Access");

Open in new window


now how can i check for 2003 and 2010 ??
0
 
LVL 8

Expert Comment

by:crysallus
ID: 35015749
You can find the internal version numbers at the wiki page:

http://en.wikipedia.org/wiki/History_of_Microsoft_Office

2003: 11.0
2010: 14.0
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

774 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question