At Boxaid we have seen every technical computer problem in existence. We have fixed over 10,000 computers in the 13 years we have been business. Every now and then we do run into a problem that we have solved before but the typical list of solutions that used to work no longer works. This of course, is very frustrating to our customers and technicians alike. A common tech problem we get all way from Windows 7 to Windows 10 is broken file associations. We have written about the topic of unable to open certain files before but it’s been a while so lets revisit the modern version.
How Windows File Associations Work
This problem involves going to open some kind of file like a word document, an excel spreadsheet, or browser shortcut and Windows has no idea how to open the file. Every file type has some kind of extension at the end of its name like resume.docx or spreasheet.xls that lets Windows know which program to use to open that kind of file. So when you double click a file that ends in docx, Windows should be smart enough to know that you want to open that file with Microsoft Word. Normally this all works without a hitch and Windows has all these extensions loaded already and knows which files are opened with which programs. But occasionally, there is some kind of corruption that may occur because of a virus, a poorly written program or the evil computer gremlins. In these cases you need to fix the broken file association otherwise Windows will have no idea what program to use to open your file.Common Ways to Fix Broken File Associations
Now this is a common problem and it is thoroughly documented all over the Internet for the specific Windows version you are using. There are several great articles that cover the proper way to go about changing file associations on Windows 10, Windows 7 and Windows XP (hopefully you are still not using Windows XP) Below are some of our favorite articles that cover this topic in detail. The bigger question is this: What if you have already tried the normal procedures to correct or fix your default file associations and none of them worked? Now what? Well that’s the exact problem we ran into with one of our customers. https://www.lifewire.com/how-to-change-file-associations-in-windows-2624477 https://support.microsoft.com/en-gb/help/4028161/windows-10-change-default-programs https://www.windowscentral.com/how-force-windows-10-set-apps-defaultAlternative Methods of Fixing File Associations
We ended up reading countless other alternative ways to fix broken file associations on Google. There were ways of doing it in the registry, via pre-made packages that you can get from Microsoft and countless other suggestions as well, like uninstalling the application that is giving us the problem and reinstalling which also did not work in our case. Here’s an example of a post that shows promise but the user was struggling just as much as we were. https://www.tenforums.com/software-apps/102498-program-i-want-set-default-will-not-show-up-under-default-prog.html We finally were able to figure it out after extensive research and here is what worked for us.STEP 1
First you need to get the associated name of your file type that you are trying to fix. In the example below we are trying to change our default browser to be Google Chrome and all Internet URLs should open with Chrome instead of any other browser. Open up a command prompt in Windows as an admin. In the command prompt run the followingc:\windows\system32>assoc {filetype}
For example:
c:\windows\system32>assoc .url
This should output .url=InternetShortcut
[info_message style=”info”]Make a note of what you get above which we will need in step 2 for “file_association” value.[/info_message]
STEP 2
Now that we have the filetype association for URL files, we need to run the ftype command.
ftype {file_association}="absolute-path-to-application" "%1"
For example:
ftype InternetShortcut="C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "%1"
If the command runs successfully then chrome should be the browser that is used to open URL shortcuts in the future. This concept of course applies to programs like Excel, PDF files, Word documents, etc. In the case of this one customer that we were having a problem with it was Microsoft Excel Files.
You can learn more about the ftype command on Microsoft’s website here.
You can learn more about the assoc command on Microsoft’s website here.
File Association Not Found
If when you type the ftype command above you get something like:File association not found for extension
then you need to create an association like below:
assoc .{XXX}={filetype}
For example:
assoc .txt=txtclass
[info_message style=”warning”]We hope you found this article useful. Please visit our home page in case you need help from our certified IT support experts. Boxaid IT support technicians fix thousands of computers per year from the comfort of your home or business.[/info_message]