How to find location of program in "Open With" list?

1

I need to remove a program in the Open with list (I need to replace a custom program with a newer version and I don't remember where the .exe file is).

How would I be able to find the location of this program on my computer?

For some reason I cannot find it with application name, even when searching all .exe file. There is no installer for the program, it's just an .exe you put where you want.

Cherry

Posted 2019-06-28T16:25:28.460

Reputation: 13

You don't need to know the location to upgrade, just install the new version. But in any case you can search using the software's name. – None – 2019-06-28T16:38:59.903

@GabrielaGarcia I added to my question to answer those details – Cherry – 2019-06-28T16:50:45.727

What you describe is a typical "portable" software but if it is in the Open with... list that isn't the case, it must have been ibstalled somehow. and if it is on that list it also should be in your software list. – None – 2019-06-28T16:53:41.523

@GabrielaGarcia It is entirely possible to add portable software to the Open With dialog and then forget where it's installed. – Worthwelle – 2019-06-28T16:59:59.940

Answers

1

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
    )
)

Worthwelle

Posted 2019-06-28T16:25:28.460

Reputation: 3 556

When I try the first one, it says the system was unable to find the registry key or value? – Cherry – 2019-06-28T17:06:39.307

Did you replace .php with whatever file extension you're looking for? – Worthwelle – 2019-06-28T17:07:33.540

ho! I thought it was a folder in regedit!! – Cherry – 2019-06-28T17:08:29.137