devmgmt.msc: This file does not have a program associated

When trying to open the Device Manager (Control Panel – System and Maintenance – System), the following error may occur:


This file does not have a program associated with it for performing this action. Create an association in the Set Associations control panel.

When you get this error, there’s probably something wrong with your file association *.msc. In most cases, the association seems to be correct, but it isn’t. The best practice for this issue is re-importing the correct register settings. Follow the instructions below to import the correct settings:

  1. Click Start, click Run, type Regedit and click OK
  2. On the left side, navigate to HKEY_CLASSES_ROOT
  3. Make a backup of your HKEY_CLASSES_ROOT. To do this, right-click HKEY_CLASSES_ROOT, choose Export, and save it as “old-classes_root.reg
  4. Delete these registry keys. To do this, right-click the keys and select Delete
  5. The incorrect settings are now deleted.
    Download the MSC fix for Vista. This registry file contains the correct file type association settings for Windows Vista.
  6. Navigate to the file you have just downloaded. Double-click. A window will pop up whether you are sure to add the settings. Click Yes.
  7. Your file type association for MSC-files is now restored to its default. Opening your Device Manager should be working again.

10 thoughts on “devmgmt.msc: This file does not have a program associated

  1. This solution (still) works.

    (couldn’t access services.msc (and others) on a recently repaired HP laptop running Vista Business that hadn’t been updated for a year… after (75+) Windows updates, the “permissions” didn’t seem to work)

    Thanks Christian… Awesome.


  2. Thanks million Christian,

    I’m looking for this solution a long time but this is the 1st fix that works perfectly.

    Well done and much appreciated.


  3. it worked.. thanks a lot christian.. THANKS THANKS THANKS..
    i thought it was virus or something weird..
    why it can like this ya?

  4. I had this problem when I booted this morning and tried to open the Device Manager from Vista “Computer Properties”. It worked fine from Control Panel. I downloaded the .reg and followed the directions and can now confirm that it works. Thanks a tonne.

  5. Hi,

    I have been having this same problem. I followed the instructions and rebooted, but I’m still getting the same error. Are there any other things I can try?


  6. Hi Paul,

    The link to download the MSC fix seemed to be dead. I fixed it, so you can now download the MSC fix.
    As instructed in my post, you should first delete the existing MSC registry keys (make a backup first!). After deletion, you can import the settings from the file I referenced in my post.
    Please let me know the result!

  7. I know I most likely won’t get an answer, but I did not quite understand what you asked to change. When i open it up to edit, both keys are already present. ::sigh:: damn vista, i tried to love you… i tried.

  8. I also had this problem but as Andrew wrote, the link does not work.

    Apparently at some point the shell\RunAs\Command default value gets changed from REG_EXPAND_SZ to REG_SZ and this is what causes the mallfunction the %SystemRoot% does not get translated to C:\Windows (or whatever your systemroot is)

    So here’s what i did:

    Under HKEY_CLASSES_ROOT\MSCFile, select the open\command “folder” and export.
    Edit the .reg file and change the key from open to RunAs:
    [HKEY_CLASSES_ROOT\mscfile\shell\open\command] ->
    Import the edited .reg file.

Leave a Reply

Your email address will not be published.