?
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
?
826 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 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

719 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