Solved

Powerpoint version and location detection

Posted on 2010-09-07
5
696 Views
Last Modified: 2012-05-10
How do  you programmatically find the version and location of powerpoint on a win 7 system.
0
Comment
Question by:itrphil
[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
  • 3
5 Comments
 
LVL 2

Expert Comment

by:coronoahcoro
ID: 33624064
what programming language are you using? VBA?
0
 

Author Comment

by:itrphil
ID: 33624084
IT's C#

Thanks
0
 
LVL 3

Accepted Solution

by:
Chocco earned 500 total points
ID: 33624520
You could try the following Code;

You can use the following code:

private bool IsOutlookInstalled()
{
Type requestType = Type.GetTypeFromProgID("Powerpoint.Application", false);
if (requestType == null)
{
RegistryKey key = null;
try
{
key = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Office", false);
if (key != null)
{
double version = 0.0, temp = 0.0;
string[] valueNames = key.GetSubKeyNames();
for(int i=0; i<valueNames.Length; i++)
{
temp = 0.0;
try
{
temp = Convert.ToDouble(valueNames[i],
CultureInfo.CreateSpecificCulture("en-US").NumberFormat);
}
catch
{
}
if (temp > version) version = temp;
}
key.Close();
if (version != 0.0)
requestType = Type.GetTypeFromProgID("Powerpoint.Application."+version.ToString().Replace(",", "."), false);
}
}
catch
{
if (key != null) key.Close();
}
}
return (requestType != null);
}

private int GetOfficeVersion()
{
RegistryKey key = null;
try
{
key = Registry.ClassesRoot.OpenSubKey(Powerpoint.Application\\CurVer", false);
if (key != null)
{
string version = key.GetValue("", "Powerpoint.Application.9").ToString(); key.Close();
int pos = version.LastIndexOf(".");
if (pos >= 0)
{
version = version.Remove(0, pos+1);
return Convert.ToInt32(version);
}
}
}
catch(Exception e)
{
if (key != null) key.Close();
module.DoError(e);
}
return 9;
}
0
 

Author Comment

by:itrphil
ID: 33665438
Does this matter if we have a virtualized version of Office 2010 ?  eg. It seems Office 2010 Home and Student have different Registry entry:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\PowerPoint\InstallRoot

 than the typical  

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\PowerPoint\InstallRoot

0
 

Author Closing Comment

by:itrphil
ID: 33686091
Need also to know how to find MS 2010 Office Home and Student , Home and Business, and Starter

All these versions uses Microsoft new virtualization App-V CVH.EXE to deliver codes.
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

729 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