just figured out how to check Microsoft Office applications, if they are installed and the version...
I also refer you to read http://support.microsoft.com/kb/240794 where I picked this up from.
Code: Select all
DEFINE REGION: Check Application Requirements
Check Registry Key HKLM\SOFTWARE\Classes\Excel.Application\CurVer\ into OfficeCurVer
END REGION
This will give you "if the product is installed" (otherwise the registry entry shouldn't be there NO$KEY) and the version as follows:
OFFICECURVER = Excel.Application.15
This works for both Office 2010 and Office 2013 that I've tested so far (Windows 7 x86 and x64)
The trick I've worked out is to use the Application Class (as stored in the registry) which is version agnostic rather than try to determine the version of the application by reading the office keys direct.
The application Classes are:
Code: Select all
Microsoft Access Access.Application
Microsoft Excel Excel.Application
Microsoft OneNote OneNote.Application
Microsoft Outlook Outlook.Application
Microsoft PowerPoint Powerpoint.Application
Microsoft Visio Visio.Application
Microsoft Word Word.Application
Microsoft Project (2013) does not use Application Classes as above so use the following keys registry entry:
Code: Select all
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Project\shell\open\command
which will return something akin to:
C:\PROGRA~1\MICROS~4\Office15\PROTOC~1.EXE "%1"
Hope this helps and if anyone wants to add updates to this please do...
Best regards
Seán