How to fix Issues with Windows File Type Associationsβ
Contentsβ
View and tweak Windows Registry entries for File Associations.
Registryβ
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts
DISM XML Templatesβ
Import and export default file association template XML Files via DISM
command line commands.
Export Defaultsβ
dism /online /Export-DefaultAppAssociations:"%UserProfile%\Desktop\DefaultAppAssociations.xml"
Import Exported XML Fileβ
dism /online /Import-DefaultAppAssociations:"%UserProfile%\Desktop\FileAssociations.xml"
Remove to Revert Changesβ
In case you want to revert the changes you have made, run this command:
`Dism.exe /Online /Remove-DefaultAppAssociations`
ASSOC Commandsβ
Change associations like-so:
assoc .extension_name=file_type
For example, to associate .scr
file type with notepad
, execute:
assoc .scr=txtfile
# to revert
assoc .scr=scrfile
To see , list of file type associations in your system , just type `assoc | more`.
FTYPE Commandsβ
First run, assoc <file_type_you_are_facing_problem_with>
assoc .exe
> .exe=exefile
assoc .yml
> .yml=yml
assoc .url
> .url=InternetShortcut
Note down the output to the right of = and run:
ftype output_obtained=<absolute_path_of_application> %1
# url associate with edge
ftype InternetShortcut="<PATH to Edge>" "%1"
Links: Command Line - CMD WindowsDevEnv Windows Registry Windows Command Line Commands Overview
Sources: - https://thegeekpage.com/fix-file-type-association-error-in-windows-10/