Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I right click anywhere I get an option to add a new file file a specified extension. I would like to add some custom files into this menu, so I can right click and create a new PHP file for instance.

How can I do this?

share|improve this question
try new menu editor tool included in Right Click Enhancer at – Ravi Patel Dec 15 '12 at 7:50
If you are having problems adding an entirely new file extension (rather than simply adding NullFile/FileName to an existing entry) in Windows 7, then see this other question...… – w3dk Nov 1 '13 at 10:58
Ramesh’s site is a good source for manually adding entries. – Synetech Nov 10 '13 at 15:47
up vote 52 down vote accepted

To add extensions of your choice to the list: create a file, add the content below, save it as whatever.reg, and run it.

Note: Replace .png with the file extension you want to add and replace whatever with anything you want.

Windows Registry Editor Version 5.00



share|improve this answer
spot on! +1 – Molly7244 Sep 3 '09 at 2:46
Please consider link rot. – Mehper C. Palavuzlar Jan 26 '11 at 20:47
Good call. Answer edited :) – th3dude Jan 27 '11 at 21:45
This didn't work for me in Windows 7. I had two other existing keys below ".doc" (PersistentHandler and Word.Document.8.) Could that interfere with this? The contents of the .reg file I added to my Reg were: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.doc\ShellNew] "NullFile"="" – Clay Nichols Jan 31 '11 at 15:15
@Clay: Did you try a restart? – surfasb Nov 20 '11 at 19:29

One more thing:

If you want to add a file as a template for the new item, use

Windows Registry Editor Version 5.00

and then place the file (html.html) in:

  • For your own profile: %Userprofile%\Templates
  • For all users: %Allusersprofile%\Templates
  • For the whole system: %Systemroot%\ShellNew

One more detail: if you want to delete the "Windows Live Call" entry, use:

share|improve this answer
Cool thought, to able to use a file as a template! – Clay Nichols Jan 28 '11 at 20:02
In case anyone is wondering, the FileName entry appears to override the NullFile entry mentioned in other answers. You don't seem to need to delete an existing NullFile value. However, having both entries does seem to confuse some other 3rd party utilities, such as NirSoft's ShellMenuNew. (Windows 7) – w3dk Nov 1 '13 at 10:55
I don't think it needs to be in %Userprofile%Templates etc if you give the whole path name to the file. – jiggunjer Jun 20 '15 at 2:39
What do I do if I want to create two shortcuts to two different templates for the same program? For instance, I used this method perfectly to create a context menu item for an "article" template for TeXworks. I now want to also add a "modified_article" template for TeXworks. Can I add both to the context menu? Thanks! – Prahar May 22 at 18:19
@Prahar That's a new question you should ask separately – Tobias Kienzler Jul 15 at 11:12

Go in to registry editor and expand HKEY_CLASSES_ROOT

Go to .file_extention

and create a key called ShellNew

Inside that, create a new string key called NullFile with no value

For example, if I wanted to create a new entry for a blank .wil object* I would create

NullFile = ""

*if the file extension such as .wil does not exist, I would first create a file with that extension and double click it. Open it with the program of my choice as this would then create the other needed registry keys and make your job easier.

share|improve this answer
Dosen't work on Windows 10, also I found this article, but this not working either: – Neo Apr 29 at 22:28

ShellNewHandler helped me to restore my Windows 7 shell menu > New > txt document entry.

enter image description here

  1. Uncheck .txt
  2. Click Apply
  3. Check .txt
  4. Click Apply
share|improve this answer
thanks for this – VISQL Aug 28 '12 at 18:34
Does this allow you to add new entries? From the screenshots and description it doesn't appear to. – w3dk Nov 1 '13 at 10:16

For removing entries from the list, here is a program which allows you to enable/disable entries from a GUI. Much easier than searching the registry!

Unfortunately, it does not allow you to add entries.

share|improve this answer
This is just what I needed, thanks! Generally, all you really need is "New Text Document"... – Andrew Jun 14 '11 at 15:51
Thanks, was giving myself stress ulcers over this – Mahdi.Montgomery Aug 18 '11 at 18:46

You didn't say what version of Windows you're using--if it's XP you can download the TweakUI PowerToy from Microsoft (also covered in Wikipedia). Click on Templates and add/remove file types to your heart's content. Here's what it looks like: enter image description here

share|improve this answer

Create a plain text file and add the following line to it:

Windows Registry Editor Version 5.00


Save the file and rename it's extention to a .reg file. E.g. "myNewItem.reg". Be sure that you renamed the extention and not only the file name like (myNewItem.reg.txt)

Double click the file and it will update your registry.

The next step, and that is very important, restart your computer directly. So DON'T try to open the content menu to see if it's already works! First restart you computer.

If you open the content menu to see if your amazing new item is already listed, the registry will be restored ...

Also try this program:

share|improve this answer

The registry key:


cannot be changed to accomplish what is displayed or not displayed on the "New" context menu. If you change that value, it will be overridden by Explorer the next time you right click and bring up the "New" context menu. Try it and you will see what I mean.

share|improve this answer

You must log in to answer this question.

protected by Community Dec 8 '11 at 13:32

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?