Windows – How to create registry key of type REG_NONE

file associationwindowswindows-registry

Information on files' associations are stored in HKLM\SOFTWARE\Classes and HKCU\SOFTWARE\Classes Windows' registry branches (among others). Each entry there can have OpenWithProgIDs key which adds programs named in it's values to the list of programs accessible from Open With entry in the context menu. Many of these keys have REG_NONE type. However regedit doesn't allow to create keys of this type – this type is absent from the list of key types available under New entry of the context menu.

How can I create a registry key of type REG_NONE to add new program to the list or to recreate previously deleted key?

Best Answer

I also needed to create a REG_NONE key in HKCR.

Using regedit I found an existing file association within HKCR that had a REG_NONE key under its OpenWithProgIDs branch (e.g. HKCR\.mp3\OpenWithProgIDs). I exported this registry to a .reg file.

Then, I used notepad to edit the exported file and changed the branch to match the location where I wanted the REG_NONE key. I deleted all the other keys listed except the one REG_NONE key I wanted. If you need to rename the REG_NONE key do that as well.

Import the file back into your registry and it will add the new key value as REG_NONE.

The .reg file looks like:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\..etc..\keyname]
@=hex(0):

Change ..etc..\keyname to the actual key name. @=hex(0): is the line which creates the REG_NONE element.

Related Question