Registry : How to add extension keys through command line


  1. Posts : 2
    Windows7
       #1

    Registry : How to add extension keys through command line


    I am looking for some help:
    I wish to add a new extension key of type .dns
    If I execute :
    reg add HKEY_CLASSES_ROOT\.dns
    Then the key .dns does not get added to HKEY_CLASSES_ROOT but somewhere in HKEY_CURRENT_USER ?
    How do I get the command to add the .dns key to HKEY_CLASSES_ROOT ?
    What command should I execute?

    Thank you
      My Computer


  2. Posts : 16,154
    7 X64
       #2

    HKLM\SOFTWARE\Classes
      My Computers


  3. Posts : 2
    Windows7
    Thread Starter
       #3

    Thanks, but when I execute
    reg add HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.dns
    it still does not add .dns to HKEY_CLASSES_ROOT
      My Computer


  4. Posts : 6,285
    Windows 10 Pro X64
       #4

    Enter reg add /? for info on how to use it:
      My Computer


  5. Posts : 2,468
    Windows 7 Ultimate x64
       #5

    HKEY_CLASSES_ROOT is just an alias to HKEY_LOCAL_MACHINE\Software\Classes, and using both is exactly the same.

    Most likely, it's just a permission issue. HKEY_CLASSES_ROOT is a system-wide key that, by default, is read-only to non-admins. To change it, you must run the commands in an elevated command prompt, or run regedit as administrator, otherwise the write will be virtualized to HKEY_CURRENT_USER, into the VirtualStore, or just fail with an "access denied".
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 08:47.
Find Us