Microsoft Office - How to check Apps

Post specialized setup scripts you have created here.
Post Reply
Seán
Posts: 13
Joined: Wed Nov 13, 2013 10:24 am

Microsoft Office - How to check Apps

Post by Seán »

Hi All,

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
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Microsoft Office - How to check Apps

Post by FrancescoT »

... Thanks for sharing it!

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply