Configuring Windows Explorer
Registry Overview - Description of the ShellNew Key


Whenever you right click in a blank area in the right hand panel (the file list section) of Windows Explorer, the popup menu contains a New option with a list of possible objects. The top 2 selections - Folder and Shortcut - appear to be hard coded. The bottom section (below the line) is controlled by the ShellNew registry key.

The general format is

HKCR\.ext               Default ="Pointer to another key"
HKCR\.ext\ShellNew      Default =(value not set)
                        Command ="any valid command"
                        FileName="any file in the Template directory"
                        NullFile=""
                        Data    =the actual text (bytes) to be 
                                 placed in the file
Search the registry for ShellNew, or see below, for several examples.

The Template directory is normally c:\Windows\ShellNew, but it can be changed by modifying the registry. Simply search for the word Templates and you will find the entry under

     HKEY_USERS\.default\Software\Microsoft\Windows\
                         CurrentVersion\Explorer\Shell Folders
(Searching on \ShellNew will work better if the original configuration has not been modified.)

NullFile creates a new empty file in the current directory, FileName copies the file with that name from the Template directory. Both commands name the new file - New 'File type from the registry'.ext. In the case of a .bat file, the default action (execute or edit) does not appear to matter. NullFile and FileName both allow you to rename the file before modifying it; where as, Command = c:\windows\notepad.exe tt.bat will prompt to create the file which you must rename latter.

This information was verified by renaming the existing ShellNew keys to ShellNew.xxx and by adding various ShellNew options to .bat. Each time a key was was re-named, the associated New entry disappeared in the popup menu. Notice that several registry entries contain ShellNew keys, but that associated options never show up in the New menu. This appears to be due to the fact that the main .ext defaults are empty.

Since the registry is accessed about 2850 times every time the New menu is opened, this explains why it takes so long to open this menu.

There should be a faster way to create a new sub-directory! (Its here :-)


Some Real Examples

HKCR\.bfc               Default ="Briefcase"
HKCR\.bfc\ShellNew      Default =(value not set)
                        Command ="C:\WINDOWS\rundll32.exe 
                                     syncui.dll,Briefcase_Create %1!d! %2"
HKCR\.bfc\ShellNew
           \config      Default =""
                        NoExtension=""

HKCR\.bmp               Default ="Paint.Picture"
HKCR\.bmp\ShellNew      Default =(value not set)
                        NullFile=""

HKCR\.htm               Default ="NetscapeMarkup"
HKCR\.htm\ShellNew      Default =(value not set)
                        FileName="netscape.html"

HKCR\.html              Default ="htmlfile"
HKCR\.html\htmfile\ShellNew
                        Default =(value not set)
                        Data=<HTML></HTML>

HKCR\.txt               Default ="txtfile"
HKCR\.txt\ShellNew      Default =(value not set)
                        NullFile=""

If the following ShellNew key is disabled, you will still be able to define shortcuts, but the dialog box which aids in their definition will be disabled.
HKCR\.lnk               Default ="lnkfile"
HKCR\.lnk\ShellNew      Default =(value not set)
                        Command ="C:\WINDOWS\rundll32.exe 
                                               AppWiz.Cpl,NewLinkHere %1"


Suggested Modifications


HKCR is an abreviation for HKEY_CLASSES_ROOT

This page is based on data from Windows 95.


Author: Robert Clemenzi - clemenzi@cpcug.org
URL: http:// cpcug.org / user / clemenzi / technical / WinExplorer / WinExplorerRegistry_ShellNew.htm