Thursday, October 13, 2011

Add new file extension to right click context menu

For some reason, the "New" option when right-clicking in Explorer did not show the .doc file anymore. Here is how to fix it. Create a simple text file, copy this content

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\docfile]
@="Word Document"
"FriendlyTypeName"=hex(2):40,00,3d,00,22,00,44,00,4f,00,43,00,20,00,66,00,69,\
  00,6c,00,65,00,22,00,00,00

[HKEY_CLASSES_ROOT\.doc]
@="docfile"

[HKEY_CLASSES_ROOT\.doc\ShellNew]
"NullFile"=""

And then rename the file with the extension .reg and run it.

To delete the entry, repeat the procedure with the following content:

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\docfile]
@="Word Document"
"FriendlyTypeName"=hex(2):40,00,3d,00,22,00,44,00,4f,00,43,00,20,00,66,00,69,\
  00,6c,00,65,00,22,00,00,00

[-HKEY_CLASSES_ROOT\.doc]
@="docfile"

[-HKEY_CLASSES_ROOT\.doc\ShellNew]
"NullFile"=""

Unfortunately this method creates just a text file with a .doc extension, no real Word document, so beware!