Summary: Default right-click action changes to Cmd for folders in Windows 10. Double-clicking folders shows the association error message.
I’ve seen a few cases where the default action for folders somehow changed from Open to Cmd, showing up in bold when you right-click a file system folder. And clicking it shows the following file association error message:
This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel.
Although the cause isn’t clearly known, all of the systems which had the problem were running Windows 10. Directory association settings had some keys and values missing, and one of these methods resolves the problem.
Right-click Start, click Command Prompt (Admin)
Type the following command:
reg add HKEY_CLASSES_ROOT\Directory\shell /ve /d "none" /f
If the same problem is seen when double-clicking drives, run this command:
reg add HKEY_CLASSES_ROOT\Drive\shell /ve /d "none" /f
That fixes the default double-click action (sets to "open") and there by resolves the problem.
Download Directory association fix (for Windows 10). For other operating Systems, check out File/Folder Association fixes pages at Windows Vista | Windows 7 | Windows 8 | Windows 10.
Running the following Reg.exe command from a Command Prompt window showed two things:
reg query hkcr\Directory\shell /s
1. The “Directory\shell” key didn’t have the (default) entry. It should be set to "none" (without quotes).
2. The "cmd\command" key was missing the value data for (default). It should be set to
cmd.exe /s /k pushd "%V"
Creating these entries fixed the problem.
15 thoughts on “[Fix] “Cmd” is the Default Action for Folders (Right-click Menu)”
I had to contact Microsoft Support in the end as nothing I tried would work. They decided that my Windows 10 had corrupt files and they reinstalled Windows 10 and the problem now seems to be resolved. Thanks to those who tried to assist me.
I had to do Fix 2, Then Fix 1 in that order to get it to work, but it DID fix the problem!
Thanks a lot this fixed even not been able to create a new folder in windows. Thanks a lot!!!!!!!
Thanks so much. Been having this issue with my work laptop for a while now.. Your solution worked perfectly.
This cmd problem haunted me for a week! Double-click or right click on drives and devices in My Computer gave error message about default program etc.
Did Fix 2 and problem solved. Now opening with double left click and “Open” is highlighted and at top of context menu.
how to remove the ‘cmd’ that appear in my menu box content.. it always appear when i click my menu box content in desktop..
please help me, thankyou..
Worked for me many thanks. for windows 7 download “Directory” in : https://www.winhelponline.com/blog/file-asso-fixes-for-windows-7/
Worked great, thanks!!
Thanks. It worked for me. You are great!.
@sherdil: YW. Glad that helped.
Thank you! it works like a charm.
when i installed .net core sdk ,cmd and search options added to my context menu.
first command worked for me,but the cmd and search options are still in the context menu.
thanks for your advice. it’s really works 🙂
THANK YOU VERY MUCH, YOU SAVE ME.
FROM EAST JAVA…..
It really worked!!!Thank you!!!