Many installed programs that are NOT necessarily in your %PATH% have their FQFN at the default Value Name of a Command sub-key of the HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\<Program>\Shell registry key, where <Program> is the program name, like WINWORD.EXE or OUTLOOK.EXE.

I have scripted WhatPath.bat to return the FQFN if it is available at HKLM\SOFTWARE\Classes\Applications\<Program>\shell.

The syntax for using WhatPath.bat is:

\[Call\] WhatPath Program.exe FQFN


<b>Program.exe</b> is the program name, like <b>WINWORD.EXE</b> or <b>OUTLOOK.EXE</b>.

<b>FQFN</b>        is a <a href="/article/jsifaq/jsi-tip-5535-how-can-i-cause-a-called-batch-file-to-return-a-call-directed-environment-variable-.aspx">call directed environment variable</a> that will contain the <b>FQFN</b>
            (<b>F</b>ully <b>Q</b>ualified <b>F</b>ile <b>N</b>ame) of <b>Program.exe</b>.
WhatPath.bat contains:
@echo off
if \{%2\}==\{\} @echo Syntax WhatPath Program.exe FQFN&goto :EOF
set prog=%1
set prog=%prog:"=%
set pp=%prog%
set OK=N
call :quiet>nul 2>&1
if /i "%pp:~0,12%" NEQ "rundll32.exe" set pp="%pp%"
endlocal&set %2=%pp%
goto :EOF
set qry=reg query "HKLM\SOFTWARE\Classes\Applications\%prog%\shell" /s
for /f "Tokens=2*" %%a in ('%qry%^|find "<NO NAME>"^|find "REG_"^|find /i "%prog%"') do (
 if "!OK!" EQU "N" call :setpp %%b
goto :EOF
set OK=Y
set pp=%2
set pp=%pp:"=%
if /i "%pp%" EQU "rundll32.exe" set pp=%2 %3,%4&goto :EOF
If \{%3\} EQU \{\} goto :EOF
set wrk=%pp:.=%
if "%wrk%" NEQ "%pp%" goto :EOF
set pp=%pp%%3
shift /4