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.

  • 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. – user931000 Jun 28 '19 at 16:38
  • @GabrielaGarcia I added to my question to answer those details – Cherry Jun 28 '19 at 16:50
  • 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. – user931000 Jun 28 '19 at 16:53
  • @GabrielaGarcia It is entirely possible to add portable software to the Open With dialog and then forget where it's installed. – Worthwelle Jun 28 '19 at 16:59
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
    )
)
| improve this answer | |
  • When I try the first one, it says the system was unable to find the registry key or value? – Cherry Jun 28 '19 at 17:06
  • Did you replace .php with whatever file extension you're looking for? – Worthwelle Jun 28 '19 at 17:07
  • ho! I thought it was a folder in regedit!! – Cherry Jun 28 '19 at 17:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.