If I have a file with the extension .class and I opened it with Notepad. How do I destroy that association so that Notepad is not associated with the .class file type? I do not want to change the .class association to another program - just remove it.

I use Windows 7.

  • … and you don’t even tell us your OS?
    – Kissaki
    Dec 16, 2012 at 20:12
  • 1
    @Kissaki 'Notepad' implies Microsoft Windows
    – user49740
    Dec 16, 2012 at 20:18
  • 3
    So … which version of windows? :) The steps necessary may differ.
    – Kissaki
    Dec 16, 2012 at 20:19
  • I do not want to change the filetype association to another program - just remove it. So what do you want to happen when you double-click it? Do you want the Open with… dialog? What is the extension? How did you create it in the first place? There are several ways and places that an extension can be registered, so getting rid of it will depend on how/where it was made.
    – Synetech
    Dec 16, 2012 at 20:27

5 Answers 5


In a discussion I found, a Microsoft MVP recommended the use of this program, "unassoc.exe", perfect for your needs.

unassoc is a small portable executable, whose only UI elements include a list of all file types with associations on your computer, the ability to select one or more extensions, and the ability to delete the file type associated with that extension.


Also, if you're simply worried about the overhead of having multiple file extensions registered to a program you don't have installed anymore, the registry cleaner bundled with CCleaner can automate this process for you. It can scan for unused file extensions, and delete the relevant registry entries.


In Windows Vista you click the Start button and select "Default Programs". There are several options -- you probably want "Associate a file type or protocol with a program".


Use regedit to remove the keys associated with the file extension. Then restart explorer.

  1. Open regedit.

    • Win+R.
    • type regedit.
    • Enter.
  2. Delete .ext keys / values from the registry.

    • Edit -> Find.
    • Enter extension name with preceding dot (ex- .txt).
    • Delete found keys / values.
    • Use F3 to goto next search result.
    • Delete all such keys / values until end of search.
  3. Restart explorer.

    • Open Task Manager.
    • Find Windows Explorer.
    • Right Click -> End Task.
    • Repeat the same for remaining Windows Explorer.
    • Win+R -> type explorer -> Enter

This should unassociate the file type.

  • In Step 2, which .ext are you talking about? Where is it located?
    – Pacerier
    Nov 26, 2016 at 7:17

Windows XP

  1. Click on the Start menu with your mouse or press the "Windows" button on your keyboard.
  2. Click on the "My Computer" option in the Start menu.
  3. Click on the "Tools" tab along the menu bar.
  4. Click on the "Folder Options" option.
  5. Click on the "View" tab.
  6. Make sure the "Hide extensions for known file types" is unchecked, so you can see the full filenames in Windows XP, including file type associations.
  7. Click "OK" and close the "Folder Options" window.
  8. Right-click on a file you wish to change.
  9. Click on the "Properties" option in the right-click context menu.
  10. Click the "Open with..." button in the "Properties" window. Note that the file may already have a file type association saved for it (it will display the icon of the associated application). Be aware that the button may be captioned "Change..." instead of "Open with...," depending on the version of Windows XP you are using.
  11. Click on an application to choose a different file type association for your selected file type. You may also click "Browse" if the application you wish to use for your new file type association is not listed.
  12. Click "OK" once you have chosen a file type association.

Via ehow.com

Windows 7

There is no utility to actually remove, other than registry. So, you could use this utility.


If you have CYGWIN intalled on your windows, it works perfectly. Just safely change the extension of the file without touching the registery by using "mv" command.

  • 1
    Please read the question again carefully. Your answer does not answer the original question.
    – DavidPostill
    Jun 14, 2016 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.