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:HKEY_CLASSES_ROOT\.bak
- 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_USER
keys and delete the.bak
key.HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bak HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Roaming\OpenWith\FileExts\.bak
This should remove the file association settings for
.bak
file 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 ProgIDbak_auto_file
is 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
txtfile
Progid. To view the list of file types that use thetxtfile
ProgID, run:Example: txtfile (progid used for .txt)
assoc | findstr /i "txtfile"
(or)
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\txtfile
registry 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_file
Progid. Running the command forbak_autofile
, you get this:As no other file types are using this ProgID, you can safely delete this key:
HKEY_CLASSES_ROOT\bak_autofile
Summary
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!
Excellent!
@Mir-Ismaili: Thanks. Glad the info helped.
This doesn’t seem to work anymore. I have a valid association in HKLM\Software\Classes and no association in HKCU\Software\Classes. When I remove the extension from HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts (it had UserChoice and Hash keys) and reboot, the association is still active and remaining in Default Apps. My HKCR association is ignored.
@Sid : Also try here: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Roaming\OpenWith\FileExts
If not, upload the file asso report for that particular file type to Pastebin.com and post the link. You can use filetypediag to get the report.
Thanks for your help. The registry file you created worked
“bak file type was mapped to ProgID “txtfile”, ”
Shouldn’t this be “txt file type was mapped to ProgID “txtfile”, “
@bob: I’ve removed the sentence and rephrased it for more clarity. Thanks for commenting. Appreciated!
This worked great. Thanks!
Clear explanations. Solid examples. I liked the inclusion of multiple methods.
This worked great. Thanks!
Clear explanations. Solid examples. I liked the inclusion of multiple methods.
I shared on FB and twitter 🙂
Thank you for the instructions. The following steps work for me.
1. Delete HKEY_CLASSES_ROOT\.bak
2. Delete
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bak
3. I don’t have the Roaming key, so skip this step.
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Roaming\OpenWith\FileExts\.bak
4. I change the path to the preferred application in HKEY_CLASSES_ROOT\bak_auto_file\open\command
and
HKEY_CLASSES_ROOT\bak_auto_file\edit\command
5. Reboot and it’s working.
I’m trying to remove an association with a .bin file and want to leave the association blank.
I’ve tried the above. It does not recognise .bin files.
Furthermore, .bin files show up in the default apps by file type list but do not appear in the full list in Command Prompt?
Why can’t we have an extra box in Windows 10 app association options which says NONE?
@Peter: Here is the .bin file association registry file you need.
none of the fixes for .21 work for me!!
@Halima: Can you send me the file association report for .21 file type?
You can use FileTypeDiag tool to create the report:
https://www.winhelponline.com/blog/filetypediag-dump-file-association-info/
it didnt work for me..
i tried .AS file.
@liran: Can you upload the file asso report for that particular file type to Pastebin.com and post the link. You can use filetypediag to generate the report.
This is way too complicated and risky. Any solution for the layperson?
Much swifter and safer for a layperson. You’re welcome 🙂
https://answers.microsoft.com/en-us/windows/forum/all/how-to-unsetremove-a-default-app-for-file-type/15f2bf57-aa96-493a-b648-c81856af5eb3
Excellent instructions, fixed a long time file association error for me.