Did you ever have the problem that you wanted to change the file association of a certain file type but were not able to? The normal way of right-clicking the filetype, clicking on Properties, then on the Change button next to the Opens With entry and browsing to the executable is not overly reliable, especially so if executable files are not listed as default software.
Update: You may use the browse option in newer versions of Windows to locate the executable file that is not listed in the OpenWith menu this way.
Some users may have tried to change the file association with a double-click on the file after removing all existing associations from it.
My particular problem occurred after moving an application to another drive. Loading the file from within that application worked fine which was good to know but mapping supported file extensions to it did not stick at all. I tried searching the Internet for an solution but was not able to find one.
I then decided to solve the problem on my own. Here is how I repaired the broken file association and added the right executable as the default software for this application. Everything that needs to be done can be done using the command line and two commands.
Open the Windows command line and type the follwing ‘Assoc .ext’ replacing .ext with the file extension in question. It should display something like ‘.ext=name’.
Remember that and type ‘ftype name=”path to executable”‘. You might need to write ‘assoc .ext=name’ again to finish the process.
This way the file extension will again be associated with the correct executable. Below is a screenshot of how I changed the broken file association using the command line.
Update: Some users have asked for an example: Type Assoc .nzb into the command prompt and hit enter. Windows should now return the associated class for the file type. You can now use the command ftype [class]=”new path to program” to fix the file association, e.g. ftype nzb_auto_file=”d:testnbpro.exe”.
The method enables you to assign file extensions to new programs quickly in Windows. While it may not be always faster than using the OpenWith menu or the settings that Windows ships with, it seems more reliable and especially useful if the new mapping won’t stick for whatever reason.