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
815 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

758 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now