In Windows 10 or Windows 11. when you try to Device Manager from the Command Prompt (admin) window, the Device Manager doesn’t run. The following error message comes up when you do so:
C:\windows\system32\devmgmt.msc This file does not have an app associated with it for performing this action. Please install an app or, if one is already installed, create an association in the Default Apps Settings page.
(and)
The system cannot execute the specified program
(or)
Restrictions This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator.
Right-clicking on the Start button (or pressing Win + X) and Choosing “Device Manager”, or right-clicking on This PC and clicking “Manage” gives the same result.
The same error occurs when you attempt to open Disk Management, Computer Management, or any other MMC console.
Cause
Cause 1
The above error can occur if the .msc file association is broken. However, as a workaround, you can launch Device Manager or Computer Management by running one of the following commands from Command Prompt:
mmc.exe devmgmt.msc
%SystemRoot%\system32\mmc.exe %SystemRoot%\system32\devmgmt.msc
mmc.exe compmgmt.msc
%SystemRoot%\system32\mmc.exe %SystemRoot%\system32\compmgmt.msc
But the following canonical Control Panel command-line does not work:
control.exe /name Microsoft.DeviceManager
Cause 2
Another possibility is that mmc.exe is blocked using group policy or registry-based policy (“DisallowRun
“) settings. In that case, the above commands don’t help.
The DisallowRun
registry key corresponds to the Don’t run specified Windows applications GPO.
For example, the following registry settings may be present in the subject computer.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer DisallowRun REG_DWORD 0x1 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun 1 REG_SZ taskschd.msc 2 REG_SZ devmgmt.msc 3 REG_SZ mmc.exe
In the above example, Task Scheduler, Device Manager, and mmc.exe are blocked in the registry.
Resolution
To resolve the file association or restrictions error when opening an MMC applet, follow these steps:
- Download mscfix.reg (zipped)
- Unzip the archive and run mscfix.reg
- Click Yes to confirm.
- Click OK.
This fixes the .msc file association on your Windows 10 or 11 computer.
INFO: Contents of mscfix.reg
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.msc] @="MSCFile" [-HKEY_CLASSES_ROOT\mscfile] [HKEY_CLASSES_ROOT\mscfile] @="Microsoft Common Console Document" "EditFlags"=dword:00100000 "FriendlyTypeName"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,\ 00,6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,\ 32,00,5c,00,6d,00,6d,00,63,00,62,00,61,00,73,00,65,00,2e,00,64,00,6c,00,6c,\ 00,2c,00,2d,00,31,00,33,00,30,00,00,00 [HKEY_CLASSES_ROOT\mscfile\DefaultIcon] @="%1" [HKEY_CLASSES_ROOT\mscfile\shell\Author] @="&Author" "MUIVerb"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\ 6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\ 00,6d,00,6d,00,63,00,62,00,61,00,73,00,65,00,2e,00,64,00,6c,00,6c,00,2c,00,\ 2d,00,31,00,33,00,33,00,35,00,31,00,00,00 [HKEY_CLASSES_ROOT\mscfile\shell\Author\command] @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\ 00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,6d,00,\ 63,00,2e,00,65,00,78,00,65,00,20,00,2f,00,61,00,20,00,22,00,25,00,31,00,22,\ 00,20,00,25,00,2a,00,00,00 [HKEY_CLASSES_ROOT\mscfile\shell\open\command] @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\ 00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,6d,00,\ 63,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,00,31,00,22,00,20,00,25,00,2a,\ 00,00,00 [HKEY_CLASSES_ROOT\mscfile\shell\RunAs] "HasLUAShield"="" [HKEY_CLASSES_ROOT\mscfile\shell\RunAs\command] @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\ 00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,6d,00,\ 63,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,00,31,00,22,00,20,00,25,00,2a,\ 00,00,00 [HKEY_CLASSES_ROOT\mscfile\shell\runasuser] @="@shell32.dll,-50944" "Extended"="" "SuppressionPolicyEx"="{F211AA05-D4DF-4370-A2A0-9F19C09756A7}" [HKEY_CLASSES_ROOT\mscfile\shell\runasuser\command] "DelegateExecute"="{ea72d00e-4960-42fa-ba92-7792a7944c1d}" [HKEY_CLASSES_ROOT\mscfile\shellex\ContextMenuHandlers\PintoStartScreen] @="{470C0EBD-5D73-4d58-9CED-E91E22E23282}" [HKEY_CLASSES_ROOT\mscfile\shellex\IconHandler] @="{7A80E4A8-8005-11D2-BCF8-00C04F72C717}" [-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.msc] [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.msc\OpenWithProgids] "MSCFile"=hex(0): [-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun] [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer] "DisallowRun"=- [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer] "DisallowRun"=-
The “DisallowedRun” registry key and the values may have been created by malware. Be sure to follow up with a thorough scan for malware, using Malwarebytes Antimalware or ESET scanner.
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!