Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How do you order the items in context menu?

Posted on 2007-10-01
7
Medium Priority
?
983 Views
Last Modified: 2012-08-13
i added some items to my pc's context menu, by adding the registries to the context menu.

how do you order those things? I want my added menu to be directly under "Open" (2nd item from the top) all the time. Anyone know?
0
Comment
Question by:Sylpheed777
  • 3
  • 2
6 Comments
 
LVL 17

Expert Comment

by:Shanmuga Sundaram
ID: 19997298
I am not sure whether we can sort items in context menus in xp. But hope that we can alter the way it works. Please have a look at this site

http://www.kellys-korner-xp.com/xp_tweaks.htm
http://www.extremetech.com/article2/0,1697,1838906,00.asp

or else search for any third party tools that does this.
0
 
LVL 29

Expert Comment

by:matrixnz
ID: 19997574
Hi Sylpheed777

The context menu is alphabetical so if you have something like - My Command or 1. Command it will move up the list, however this also depends on which file extension you're associating this to, the Shell Commands always tend to come first i.e. open, explore, of course the other method is to:
Open Windows Explorer
Click Tools - Folder Options
Select File Types
Navigate to the extension and Click Advanced
Select your Command and Click Set as Default

Hope that helps.

Cheers
0
 
LVL 2

Author Comment

by:Sylpheed777
ID: 20003383
ic ic , is there a way to do this programatically?

Currently i add my context menu by adding it into registry.

Also, this doesn't seem to work with txt files. I don't get the "advance" button, but just a restore button
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 29

Expert Comment

by:matrixnz
ID: 20003997
To make a command default all you need to do is add it to the shell (Default) key for e.g. for .txt

Open Regedit
Navigate to HKEY_CLASSES_ROOT\txtfile\shell
Double Click (Default) and type in the command key for .e.g if you type print then that will be the default command when you click on that particular file type i.e. text.txt

Then just export the registry keys and apply them example regedit /s myreg.reg

As an example create a reg file with the script below, then import it, this places the MyCommand as the default for .txt files it will be at the top of the list.  You can try this it's basically just using the command for "Open" but hopefully it gives you an idea how it works.
NOTE: for this to work correctly you must restore the file type to the original settings
Open Windows Explorer
Click Tools - Folder Options
Select File Types
Navigate to the extension and Click Restore

Hope that helps.

Cheers

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\txtfile\shell]
@="MyCommand"

[HKEY_CLASSES_ROOT\txtfile\shell\MyCommand\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
  54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,25,00,31,00,00,\
  00
0
 
LVL 2

Author Comment

by:Sylpheed777
ID: 20004940
hmm that helps abit, but what i'm looking for is for it to be the number 2 item in the context menu. Not necessarily be the default item.
0
 
LVL 29

Accepted Solution

by:
matrixnz earned 750 total points
ID: 20005248
Then you'll need to use alphabetical commands i.e.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\txtfile\shell\OpenProgram\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
  54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,25,00,31,00,00,\
  00
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Loops Section Overview
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question