New to using the command prompt? Check out the Windows Command Prompt Beginner’s Guide
Windows Guides subscriber, Engineer, submitted the following guide and shows us how to change file associations using the command prompt:
Dear colleagues, many of us get problems when your registry gets corrupted or settings get changed and you have mixed up extensions associated with the wrong programs. Well, don’t panic–everything is easy, we are here to raise and offer up solution to make your life easy. I will explain how to disassociate a file that has been wrongly associated with the wrong program:
Modify Program Associations with the Command Prompt
- Click the Start button and click Run.
- In the run dialog, type cmd then press CTRL+Shift+Enter (this will allow you to Run commands as an Administrator.)
- On the command line, type assoc .ext=. (replace .ext with the extension you want to disassociate. I.e. if . RAR files are associated with a wrong program, then type assoc .rar=.)
- Press enter to disassociate the rar extension and then associate it with another program by double clicking the file and choosing a new default program.
![4-9-2010 11-47-39 PM 4 9 2010 11 47 39 PM 650x180 Correct Program Associations Using the Command Prompt [How To]](http://i1.wp.com/mintywhite.com/wp-content/uploads/2010/04/4-9-2010-11-47-39-PM.jpg?resize=650%2C180)
Completely Remove a Program from Opening All Associated File Types
Well, you might ask your self, why would you go all this way while you can simply right click and choose another program to associate? This is ok, but I have seen many cases where if you do so you will end up with a corrupted icon cache and the icon of the file goes weird. Then we have to clear the default program that opens wrongly by the following steps:
- Click the Start button and click Run.
- In the run dialog, type cmd then press CTRL+Shift+Enter (this will allow you to Run commands as an Administrator.)
- On the command line, type ftype FileType=. (FileType with the real name for the file type associated to the file extension to be removed from the system. I.e. for WinRAR, type ftype WinRAR=.
![4-9-2010 11-47-39 PM1 4 9 2010 11 47 39 PM1 650x178 Correct Program Associations Using the Command Prompt [How To]](http://i2.wp.com/mintywhite.com/wp-content/uploads/2010/04/4-9-2010-11-47-39-PM1.jpg?resize=650%2C178)
How about it? I have a lot of solutions to problems I faced and never found the solution through out the www, I found it by experience and night after night fighting…
Search Windows Guides