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!

The Author — Mitch Tulloch

Mitch Tulloch is a widely recognized expert on Windows administration, networking, and security. He has been repeatedly awarded Most Valuable Professional (MVP) status by Microsoft for his outstanding contributions in supporting users who deploy and use Microsoft platforms, products and solutions. Mitch has published over two hundred articles on different IT websites and magazines, and he has written or contributed to almost two dozen books and is lead author for the Windows 7 Resource Kit from Microsoft Press. For more information, see www.mtit.com .

Latest Contributions

Featured Links