How to fix broken file associations - gHacks Tech News

How to fix broken file associations

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.

broken file association

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:\test\nbpro.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.

Summary
How to fix broken file associations
Article Name
How to fix broken file associations
Description
Find out how to repair broken file associations on systems running Windows using the command line.
Author
Advertisement

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:


Previous Post: «
Next Post: »

Comments

  1. Roman ShaRP said on September 22, 2007 at 7:25 pm
    Reply

    Did you ever try WAssociate (http://www.xs4all.nl/~wstudios/Associate/)?
    As for me – nice program.

  2. Martin said on September 23, 2007 at 10:30 am
    Reply

    Roman the software looks very nice but more complicated at first glance. Can it fix this problem or only fix associations that can also be changed using the default methods ?

  3. Roman ShaRP said on September 23, 2007 at 10:39 am
    Reply

    It is file associations editor – you can change anything related to some file extention and changes will be stored in registry.

  4. gnome said on September 24, 2007 at 12:42 pm
    Reply

    Besides, it’s not that complicated either…

  5. TechSmurf said on August 1, 2008 at 7:45 am
    Reply

    Martin, nice. Very nice.

  6. MaSlo said on October 1, 2008 at 11:10 am
    Reply

    Thanks a lot for this advice. It solved my problem with broken association of OpenOffice files. However, I had to make a small modification: after following your instruction I was able to open the desired program by double-clicking on the file, but the file did not open in the program. So instead of using ‘ftype name=”path to executable”’ I used ‘ftype name=”path to executable” %1’ and the everything was OK. Once again, thanks a lot!

  7. king coma said on October 22, 2008 at 3:53 pm
    Reply

    Thank you for this, it also solved my problems with OpenOffice. In addition to what MaSlo did, I had to write:

    ‘ftype name=”path to executable” “%1″′

    to get all files to work.

  8. Frank said on February 15, 2010 at 6:50 am
    Reply

    http://windowsxp.mvps.org/openwithadd.htm

    This program is a great way to do it GUI.

  9. C Yates said on March 12, 2010 at 1:38 pm
    Reply

    Thanks a lot, and can I just announce my approval of the Van Dread directory ^_^

  10. Vanillaman said on August 1, 2010 at 7:33 pm
    Reply

    I tried it, and all I get is an error message saying that “Windows cannot find Assoc .ext”, so Windows doesn’t seem to recognize Assoc .ext.

    1. tepnosre said on August 13, 2015 at 3:05 am
      Reply

      If anyone reads Vanillaman’s post
      i had the same problem so i found this page:
      https://support.microsoft.com/en-us/kb/184082
      it shows you how to create a ftype, and other goodies. works great with this page.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.