Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Registry : How to add extension keys through command line

11 Aug 2014   #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 System SpecsSystem Spec
11 Aug 2014   #2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64

My System SpecsSystem Spec
11 Aug 2014   #3


Thanks, but when I execute
it still does not add .dns to HKEY_CLASSES_ROOT
My System SpecsSystem Spec

11 Aug 2014   #4

Windows 10 Pro X64

Enter reg add /? for info on how to use it:
My System SpecsSystem Spec
11 Aug 2014   #5

Windows 7 Ultimate x64

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 System SpecsSystem Spec

 Registry : How to add extension keys through command line

Thread Tools

Similar help and support threads
Thread Forum
backup registry in command line
Hello I am trying to back up a registry key, I am using the command >reg export hkey_local_machine\software\microsoft\windows c:\windows\regbackup and I keep getting the error message Unable to write to the file. There may be a disk or file system error. Not sure what I am doing wrong, any ...
Backup and Restore
How to "Duplicate These Displays" via command line or registry?
Is there a simple, silent, non-interactive way to switch from "Extend These Displays" to "Duplicate These Displays"?
add folders in indexing options using registry or command line?
Hello, I'm trying to add folders in the indexing options by using either registry or command lines. This is for an unattended silent install. Any ideas ? Thanks.
Performance & Maintenance
How can I set this via command-line or registry?
How can I set this via command-line or registry? I need a way to automatically launch "Explorer c:\folder\myfolder" with a view appropriate for long filenames on any Windows Vista/Win7 PC.
Registry Editing from Command Line
So I am trying to delete some keys from the registry using command line, eventually I am going to turn it into a batch file because it is something I may have to do frequently. Basically I want to delete a folder full of registry keys without having to list every key individually. Anyone have an...
General Discussion
Command line Registry Permission
I found a lot of articles on how to gain full control over a registry key but nothing worked for me. So guys can you help Me?
General Discussion

Our Sites

Site Links

About Us

Find 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 14:39.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App