Restoring a default file association on Windows 7

You accidentally changed the default program associated with .cmd files to Notepad—how do you change it back?

To undo the file association, open Registry Editor and delete the following key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.cmd

Now the next time you double-click on a .cmd file, this reg key will be regenerated and the file association behavior for .cmd will return to its default.

But don't forget Microsoft's warning about directly editing your Registry: "Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk."

If you have feedback concerning this tip, please email me. And be sure to check out my website!

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top