I recently updated my system and now the .cmd files are no longer associated with my text editor. I prefer this association because I frequently need to edit these files at work, and do not want them to automatically run when I double-click on them as they require input options.

Normally, right-clicking on most file types brings up the “Open with” context menu, but this is not the case for .cmd files. How can I get the context menu to appear for these file types?

I have tried using the “Choose default apps by file type” control panel, but it does not provide any options for me to set a default for these file types. When I try to select a default for any file type, the system tells me that nothing is installed and directs me to the App Store. I do not want to use the App Store because I already have a program installed that can handle these file types. It seems that this program is from a few years ago and is not considered an “app” by the modern system, which is why it is not showing up in the control panel.

I have also tried going to the “Default Programs” control panel at “Control Panel\All Control Panel Items\Default Programs”, but the top two options on this screen both bring me back to the same screen.

As a workaround, I have been able to use regedit to go to the “HKEY_CLASSES_ROOT\cmdfile\shell\open\command” location and change the file association manually. However, I would prefer to find a solution that does not involve using regedit, as I would not feel comfortable suggesting this to all users. Is it possible to change the file association for .cmd files through the user interface?

Askify Moderator Edited question May 4, 2023