Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 rbsoft.org/downloads/right-click-enhancer –  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... superuser.com/questions/588647/… –  w3d Nov 1 '13 at 10:58
    
Ramesh’s site is a good source for manually adding entries. –  Synetech Nov 10 '13 at 15:47

8 Answers 8

up vote 36 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

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

Source

share|improve this answer
    
spot on! +1 –  Molly7244 Sep 3 '09 at 2:46
3  
Please consider link rot. –  Mehper C. Palavuzlar Jan 26 '11 at 20:47
1  
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
[HKEY_CLASSES_ROOT\.html\ShellNew]
"FileName"="html.html"

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:

[-HKEY_CLASSES_ROOT\.wlcshrtctv2\LiveCall\ShellNew]
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) –  w3d Nov 1 '13 at 10:55

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

[HKEY_CLASSES_ROOT\.wil\ShellNew]
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

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. –  w3d 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

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

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: http://sourceforge.net/projects/shellnewhandler/

share|improve this answer

The registry key:

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Discardable\PostSetup\ShellNew

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

protected by Community Dec 8 '11 at 13:32

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

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