A huge cookie to anyone who can answer this question.

thetxstang

Senior member
Sep 30, 2004
542
0
0
I've been pulling my hair out over this matter and Google has not been my friend. Anyone know the answer to my dilemma? A juicy cookie awaits you if you do!

I'm using Windows XP Home. If I right-click on the bare desktop to bring up the Contextual Menu, I see a "New" option. Highlighting this brings up a sub-menu that has such familiar items as Folder, Shortcut, Bitmap Image, Briefcase, Text Document, WinRAR Archive, etc.

My question is, where do these items actually exist within Windows XP environment? In other words, where would I navigate to within the OS if I wanted to sort the items within this list, or to add/remove an item there?
 

SinNisTeR

Diamond Member
Jan 3, 2001
3,570
0
0
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Discardable\PostSetup\ShellNew

?
 

jae

Golden Member
Jul 31, 2001
1,034
0
76
www.facebook.com
^^^ What he said.. Dont feel bad, I just learned that the other day while scrolling thru regedit. Before I just never had the need to use it, now I guess I could add some entries.
 

thetxstang

Senior member
Sep 30, 2004
542
0
0
Originally posted by: SinNisTeR
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Discardable\PostSetup\ShellNew

?

Hmm...interesting. Perhaps that's it. The items I mentioned previously are indeed listed there. At any rate, I was really hoping for a folder or something within the Windows directory that I could navigate to since I'm a neophyte when it comes to editing/fooling around with the registry.

Here's the bottom line in what I'm trying to accomplish: I'm trying to alphabetically sort the items in the sub-menu listed under New. They are already alphabetically sorted when viewing them in the registry entry that you provided, but not so when viewing them from the contextual menu.

Do you have any idea on how I might sort them?
 

RebateMonger

Elite Member
Dec 24, 2005
11,586
0
0
Article on using TweakUI to modify the "New >" list.

On a more technical basis, this quote might help understand where this menu comes from in the Registry and how to modify it:

From the Platform SDK

Extending the New Submenu

When a user opens the File menu in Windows Explorer, the first command is
New. Selecting this command displays a submenu. By default, it contains two
commands, Folder and Shortcut, that allow users to create subfolders and
shortcuts. This submenu can be extended to include file creation commands
for any file class. The submenu is identical to what you see when you right-mouse-click on your Desktop and select "New >"

To add a file-creation command to the New submenu, your application's files
must have a file class associated with them. Include a ShellNew subkey under
the file extension key. When the File menu's New command is selected, the
shell will add it to the New submenu. The command's display string will be
the descriptive string that is assigned to the program's ProgID.

Assign one or more data values to the ShellNew subkey to specify the file
creation method. The available values follow.

Value Description
Command Executes an application. This is a REG_SZ value specifying the
path of the application to be executed. For example, you could set it to
launch a wizard.
Data Creates a file containing specified data. Data is a REG_BINARY
value with the file's data. Data is ignored if either NullFile or FileName
is specified.
FileName Creates a file that is a copy of a specified file. FileName
is a REG_SZ value, set to the fully qualified path of the file to be copied.
NullFile Creates an empty file. NullFile is not assigned a value. If
NullFile is specified, Data and FileName are ignored.

The following illustration shows the New submenu for the .myp file class
used as an example in Creating a File Association and Customizing Icons. It
now has a command, MyProgram Application. When a user selects MyProgram
Application from the New submenu, the shell creates a file named "New
MyProgram Application.myp" and passes it to MyProgram.exe.

The registry entry is now as follows:

HKEY_CLASSES_ROOT
.myp=MyProgram.1
ShellNew=NULLFILE
...
MyProgram.1=MyProgram Application
DefaultIcon=C:\MyDir\MyProgram.exe,2
shell=doit
open
command=C:\MyDir\MyProgram.exe "%1"
doit="&Do It"
command=C:\MyDir\MyProgram.exe /d "%1"
print
command=C:\MyDir\MyProgram.exe /p "%1"
printto
command=C:\MyDir\MyProgram.exe /p "%1" "%2" %3 %4
 

thetxstang

Senior member
Sep 30, 2004
542
0
0
Thank you to everyone who replied. You are all deserving of a :cookie:. :)

It seems Tweak UI is the choice for those wanting to add or delete items from the 'New' sub-menu.

After doing further research on how to alphabetically sort those aforementioned items, it seems there is no documented way to do it. Windows defaults to sorting the items by the extension of the file they create, and evidently there is nothing you can do about it.