The "Open With…" list is stored in the registry in two separate keys. One key stores the list of applications to use for a particular file extension and the other stores the location of a particular application.
You can either look them up in regedit.exe
(which I don't suggest as you could accidentally make a change to the registry) or you can query them from the command line:
> reg query HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.php\OpenWithList
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.php\OpenWithList
a REG_SZ Dreamweaver.exe
MRUList REG_SZ ba
b REG_SZ notepad++.exe
> reg query HKEY_CLASSES_ROOT\Applications\notepad++.exe\shell\open\command /ve
HKEY_CLASSES_ROOT\Applications\notepad++.exe\shell\open\command
(Default) REG_SZ "C:\Program Files\Notepad++\notepad++.exe" "%1"
I've written a very short batch file to do most of the legwork:
@echo off
SET _Ext=%~1
IF "%_Ext%"=="" SET /P _Ext=Enter file extension to query:
for /f "tokens=2*" %%a in ('reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\%_Ext%\OpenWithList" ^| FIND /v "MRUList"') do (
echo|set /p=%%b:
for /f "tokens=2*" %%g in ('reg query "HKEY_CLASSES_ROOT\Applications\%%b\shell\open\command" /ve ^| FIND /v "MRUList"') do (
echo %%h
)
)