Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
828 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 2000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

971 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