Associating a file type with a program can be done using several ways, such as using the Open with… dialog and selecting the “Always use this app to open” checkbox, or via Default Programs or Default Apps. While you can set or change associations using GUI, there is no option provided to delete an existing file type association.
This post tells you how to remove file type associations using the Registry Editor.
Remove a File Type Association Using Registry Editor
Let’s say you’ve incorrectly associated a file type named .bak, and want to remove the association. Use these steps to remove the file association settings (for .bak) from the registry.
- Start the Registry Editor (
regedit.exe), and go to this branch:
- Note down the (default) value data in the right pane. It’s the ProgID associated with that file type.
- Right-click the key .bak, and choose Delete. Click Yes to confirm.
- Go to the following
HKEY_CURRENT_USERkeys and delete the
This should remove the file association settings for
.bakfile type. The deleted file type should now be treated as unknown by Windows; which is exactly what we wanted.
Delete the Progid as well (optional)
If you also want to clean up the ProgID key for that file type, which you noted (
bak_auto_file) in Step #3 above, you must do so only if that ProgID
bak_auto_fileis not used by any other file type. This is important.
How to find if any other file type(s) is mapped to the same ProgID? Do a search (for Data containing the ProgID string – match whole string only) in the Registry Editor. Or run one of the commands given below to find it out.
This time, let’s take the example of
txtfileProgid. To view the list of file types that use the
Example: txtfile (progid used for .txt)
assoc | findstr /i "txtfile"
reg query hkcr /d /f "txtfile" /s
In the above case, the following file extensions are still using the txtfile progid:
.LOG | .SCP | .TXT | .WTX
So, you should not remove the
HKEY_CLASSES_ROOT\txtfileregistry key, as it would break the association settings for other file types that use this key.
Now, let’s use the above method and find out if any other file extensions are using the
bak_auto_fileProgid. Running the command for
bak_autofile, you get this:
As no other file types are using this ProgID, you can safely delete this key:
To remove the file association settings for
.bak file type, we’ve deleted the following registry keys:
HKEY_CLASSES_ROOT\.bak HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bak HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Roaming\OpenWith\FileExts\.bak HKEY_CLASSES_ROOT\bak_auto_file
That’s it! Hope this guide helped you delete an unwanted or incorrect file type association on your Windows computer.
One small request: If you liked this post, please share this?One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!