Westman

Hi,

Right now, I'm using the key below to detect the version of office installed.

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Word.Application\CurVer

My problem is, if the target computer have both office 2007 and office 2003 installed, how do I detect how many version of office were installed

My solution is based on VSTO2005 SE and VS 2005 Pro on XP SP2.

Any help is appreciated.

Regards,

Westman




Re: Visual Studio Tools for Office Installed Office version.

Douglas H. Troy

You should be able to check

HKCU\Software\Microsoft\Office\

Under that hive, you'll see several versions there, 10.0, 11.0, 8.0, etc... I'm fairly certain that if a particular component is installed for that version of office, you'll find a folder under each of those for that component:

example
Word for Office 2003 would be under
HKCU\Software\Microsoft\Office\11.0\Word

Word for Office 2007 would be under
HKCU\Software\Microsoft\Office\12.0\Word

You also might want to have a look at the new ComponentCheck, it might contain the product IDs for the various installed versions of Office (I've yet to have the chance to dig into that one).

You can find the source for ComponentCheck attached to this MSDN article
http://msdn2.microsoft.com/en-us/library/bb332051.aspx