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
820 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

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…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
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…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

751 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