Reputation: 700
How can we check whether excel 2003 professional edition is installed on users machine?
I can detect Whether excel 2003 is installed or not using registry key.
If below registry key is exist then excel 2003 is installed in user machine.
HKLM\Software\Microsoft\Office\11.0\Excel
But Now, I want to detect whether installed excel 2003 is professional edition or not. So is there any way to do same.
Any help would be highly appreciated.
Upvotes: 0
Views: 138
Reputation: 11063
Check this in registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths
or
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths
Version numbers are:
7.0 -97
8.0 - 98
9.0 -2000
10.0 -2002
11.0 -2003
12.0 -2007
14.0 -2010
You can also check here:
HKLM\Software\Microsoft\VERSION\Common\InstallRoot
Where VERSION is the version of Office you are looking for.
EDIT: Answering to your comment.
You can get the product version (Standard or Professional) by querying the installed software with WMI:
ManagementObjectSearcher mos = new ManagementObjectSearcher("SELECT * FROM Win32_Product");
foreach (ManagementObject mo in mos.Get())
{
if (mo["Name"] != null)
{
string ProductName = mo["Name"].ToString();
}
}
This will get you the product version of all installed software, just search office entry and you should get the package name that appears in control panel.
Upvotes: 4