Restoring a default file association on Windows 7

by Mitch Tulloch [Published on 25 May 2011 / Last Updated on 12 May 2010]

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

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!

See Also

Featured Links