Help \ How to determine the location of WinWord.exe using Actual Installer

If you created a Microsoft Office Word or Excel-based program then you may need to know where Office is installed and what version is used.

The executable file of Microsoft Word is "Winword.exe". Here and below, examples are described for Microsoft Word. If you need it for Microsoft Excel then just replace Winword.exe with excel.exe .

A full path to "Winword.exe" is stored in the Registry under the following key (Default value):

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Winword.exe

For example, in Office 2016 this value usually is: C:\Program Files\Microsoft Office\Office16\Winword.exe

Note: a directory where Winword.exe is located, can be found in the "Path" value.

In Actual Installer, to read this value from Registry go to System \ Variables and add the following:

Variable: 		<WinwordDir>
Registry Bitness: 	Default
Registry Key: 	HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Winword.exe
Registry Value: 	Path //to read Default value leave this field blank
Value Type: 	STRING
Default Data:

When you launch your setup file, variable <WinwordDir> will contain the path to the directory where winword.exe file is located. You can use it anywhere in the setup program, e.g. as File Destination to install Add-ins.

If Microsoft Word is not installed, then this variable will contain an empty string. And it is possible to terminate the installation by adding in the Default Data: HALT(Microsoft Word is not installed)

How to get version number of MS Word?

There are several ways on how to receive the version number of Microsoft Office - from Registry; by reading version number of the Winword.exe file, and others.

Note: the user may have installed several versions of Office.

Under the following Registry key are listed installed Office versions:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office

But it's easier to get version of Office from winword.exe file. Please read more here.

NOTE: If a user has Office Starter, Home, or Student Edition installed, there is no WinWord.exe , since it uses a Client Virtualization Handler. The path to launch a .DOC (.DOCX) files could be something like this:
"C:\Program Files (x86)\Common Files\microsoft shared\virtualization handler\cvh.exe" "Microsoft Word Starter 2010 9014006604190000" /n "%1"