I can't set a program as the default to open a filetype with in Windows 7

Solution 1:

Find the registry key for the application you wish to associate, lets say for Notepad++.exe in \HKEY_CLASSES_ROOT\Applications\notepad++.exe \shell\open\command\

Check if the .exe path is right. If not, then change the path to the correct one.

After doing this, you can now go to the file you wish to associate and use the standard way Open With and choose the program you wish to open.

Explanation:

This issue happens when Windows gets confused about the filepath for a program, as file associations are handled using only the base executable name of a program (source).

This bug can be caused by:

  • Running multiple versions of a program (i.e. Notepad++ and Notepad++ Portable)
  • Moving programs to different folders.
  • Changing drive letters

Solution 2:

I had the same problem, and none of the solutions worked (like the method below of going to the Control Panel - which does the same thing if you right click the file->Open With->Choose Default). Even after selecting the new program many times, it was stuck with the old one.

I fixed it by editing the registry. Go to the concerned extension like this (I had problem with .cpp):

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.cpp

Besides these two keys: OpenWithList and OpenWithProgids, it might have a third one called 'UserChoice'. Just delete that third key. After that, it will allow you to change the default program for that file extension.

Solution 3:

example : file type .css

find and delete key

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.css

HKEY_CURRENT_USER\Software\Microsoft\Windows\Roaming\OpenWith\FileExts\.css

HKEY_CLASSES_ROOT\.css

open task Manager and Restart Windows Explorer Or reboot computer