Site icon Winhelponline

[Fix] “Cmd” is the Default Action for Folders (Right-click Menu)

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.

Fix #1

Right-click Start, click Command Prompt (Admin)

Type the following command:

reg add HKEY_CLASSES_ROOT\Directory\shell /ve /d "none" /f

Press ENTER.

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.

Fix #2

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.

More Information

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.

Exit mobile version