Jump to content

Ever Growing Context Menu


Recommended Posts

When I am in WinXP Pro, and I right-click on a file, say an mp3 file, the context menu gives me TON of choices. These selections relate to programs that edit, play, burn, or scan the file with the said extension. These programs add these options to the registry during installation.

After one install multiple programs, the context menus can be populated with many options and slow down you menus performance a full 5 seconds. Other annoyances relate to remembering which option relate to what program. I have found most context menu setting in the registry; others remain allusive. Examples follow at the end of this post.

Every application that customizes the context menu does so in its own way. I prefer removing these entries and speeding up my computer. The manually process takes me days after a clean install. The process becomes more arduous performing the task on my desktop and laptop. I would like to create a batch CleanupContextMenus.reg to move these entries to a separate folder (rather than delete the entry). My internet searches have not led me in the right direction in creating such a batch file. Please let me know if you have examples of such a batch file, FAQ on commands, and link to information.

For example (just a couple):

Edit with Dreamweaver

Edit with Fireworks

HKEY_CLASSES_ROOT\mp3file\shellex\ContextMenuHandlers\WMPAddToPlaylist

HKEY_CLASSES_ROOT\Drive=

HKEY_CLASSES_ROOT\htmlfile=

HKEY_CLASSES_ROOT\mhtmlfile=

HKEY_CLASSES_ROOT\CSSfile=

HKEY_CLASSES_ROOT\giffile=

HKEY_CLASSES_ROOT\mp3file=

HKEY_CLASSES_ROOT\mpegfile=

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder=

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory=

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shellex=

Allusive entries (plus many more)

Windows Media Player

Add to Sync List

Add to Burn List

Add to Now Playing list

Add to playlist...

Play in Windows Media Player

Winamp

Play in Winamp

Enqueue in Winamp

Add to Winamp's Bookmark List

Link to comment
Share on other sites


I suspect the best way to approach a project like this would be to monitor the installation of the programs that are creating these context menu entries using a registry monitor tool such as regsnap or InCtrl5. This should give you a fairly good idea of exactly where in the registry the context menu entries are.

You should then be able to write a fairly simple script file using the reg command (open a command prompt and type "reg /?" for details) to export and delete these keys.

I would offer to help with this project, but I find myself very short on free time lately, and already have several other unfinished projects on the go. I would certainly still be willing to offer guidance where possible though.

Good luck with this, and keep us posted. :)

Link to comment
Share on other sites

robert_neville, what you want to do, is to remove the excess entries, but still keep it for later use if you need it, right?

I'd say first backup the relevant registry key/value from a batch-file. Example:

reg export HKCR\.mp3 %systemdrive%\backups\filename.reg

Take a look at the details of the command by running this at a command-prompt:

reg export /?

Once its backed up, you can easily delete it. Look into this topic for more info on unattended deletion of reg keys/values - link.

Link to comment
Share on other sites

Thanks for the excellent information. It enlightens me on editing the registry and pointed me in the appropriate direction. One question still remains; Could one move a registry key to a newly created key? This approach would help me reserve the key for later use. Other approaches are less ideal. Exporting individual keys is a time consuming and creates organization challenges when you have many applications. Backing up the full registry creates a large file, which one has to search, if you want to reinstate a key.

Again, the information that people have provided is great; yet I am still absorbing all the data and have not re-read every article about registry tweaks. Please excuse me if the proverbial needle exists in the haystack (aka the web) you provided. I have already spent considerable time locating, isolating, and developing these batch files.

REG COPY looks very promising. An example would help.

Thanks again!

Just to give you an idea. Here are some common Window Media Player context menu additions. No doubt this task is arduous for a manual hand.

Windows Registry Editor Version 5.00

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AIFFFile\shellex\ContextMenuHandlers\WMPAddToPlaylist][-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AIFFFile\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AIFFFile\shellex\ContextMenuHandlers\WMPPlayAsPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ASFFile\shellex\ContextMenuHandlers\WMPAddToPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ASFFile\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ASFFile\shellex\ContextMenuHandlers\WMPPlayAsPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ASXFile\shellex\ContextMenuHandlers\WMPAddToPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ASXFile\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ASXFile\shellex\ContextMenuHandlers\WMPPlayAsPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AUFile\shellex\ContextMenuHandlers\WMPAddToPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AUFile\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AUFile\shellex\ContextMenuHandlers\WMPPlayAsPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AVIFile\shellex\ContextMenuHandlers\WMPAddToPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AVIFile\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AVIFile\shellex\ContextMenuHandlers\WMPPlayAsPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\m3ufile\shellex\ContextMenuHandlers\WMPAddToPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\m3ufile\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\m3ufile\shellex\ContextMenuHandlers\WMPPlayAsPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MIDFile\shellex\ContextMenuHandlers\WMPAddToPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MIDFile\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MIDFile\shellex\ContextMenuHandlers\WMPPlayAsPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mp3file\shellex\ContextMenuHandlers\WMPAddToPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mp3file\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mp3file\shellex\ContextMenuHandlers\WMPPlayAsPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mpegfile\shellex\ContextMenuHandlers\WMPAddToPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mpegfile\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mpegfile\shellex\ContextMenuHandlers\WMPPlayAsPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SoundRec\shellex\ContextMenuHandlers\WMPAddToPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SoundRec\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SoundRec\shellex\ContextMenuHandlers\WMPPlayAsPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.aif\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.aifc\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.aiff\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.asf\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.asx\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.au\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.avi\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.dvr-ms\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.m1v\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.m3u\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.mid\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.midi\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.mp2\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.mp2v\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.mp3\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.mpa\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.mpe\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.mpeg\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.mpg\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.mpv2\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.rmi\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.snd\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.wav\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.wax\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.wm\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.wma\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.wmv\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.wmx\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.wpl\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.wvx\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\audio\shellex\ContextMenuHandlers\WMPAddToPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\audio\shellex\ContextMenuHandlers\WMPPlayAsPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WAXFile\shellex\ContextMenuHandlers\WMPAddToPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WAXFile\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WAXFile\shellex\ContextMenuHandlers\WMPPlayAsPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\wmafile\shellex\ContextMenuHandlers\WMPAddToPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\wmafile\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\wmafile\shellex\ContextMenuHandlers\WMPPlayAsPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WMVFile\shellex\ContextMenuHandlers\WMPAddToPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WMVFile\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WMVFile\shellex\ContextMenuHandlers\WMPPlayAsPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WPLFile\shellex\ContextMenuHandlers\WMPAddToPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WPLFile\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WPLFile\shellex\ContextMenuHandlers\WMPPlayAsPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WVXFile\shellex\ContextMenuHandlers\WMPAddToPlaylist]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WVXFile\shellex\ContextMenuHandlers\WMPBurnAudioCD]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WVXFile\shellex\ContextMenuHandlers\WMPPlayAsPlaylist]

The above text can be placed in a traditional text files with the extension *.reg. It removes all Window Media Player context menu additions. but it does not backup, move, or copy key in case of failure.

Link to comment
Share on other sites

The simple solution is to take all of those keys once and save to a single .reg file (when your system is normal) for a backup. And just delete all of them unattended after that, using a .REG of the type you have above.

But if you need it to do the backup too, then a complex process:

"reg export" all the desired keys to filename1, filename2, etc.

then "type filename1.reg >> backup.reg" (do it that way for all files)

Then move away the resulting single backup file with another command, and thru your other .REG file, delete all the unnecessary keys which you have just finished backing up.

Link to comment
Share on other sites

No way around it, robert_neville. This is going to be a very long, involved process. Fortunately, once you have compiled the list of registry keys and values that need to be removed, implementing the backup and removal process should be fairly simple.

I have to admit though, I am a little curious why you want it all backed up. I thought the whole idea was to get rid of it. Backing up the registry before tinkering with it is always a good idea, but you will only be deleting keys you already know are safe to delete.

I suggest using a text file that can be updated easily to keep a list of the keys you want removed. Then you can use a batch file for loop (People must be sick of hearing me suggest these by now. What can I say, I'm addicted.) to read the keys from the loop and then delete them.

for /f "tokens=*" %%f in ('type RegKeys.txt') do (
reg delete "%%f"
)

If you absolutely must have backups of the keys, you can and another line in the loop that will export each key before it is deleted.

for /f 'tokens=*" %%f in ('type RegKeys.txt') do (
reg export "%%f" >> "%userprofile%\My Documents\RegKeys.reg"
reg delete "%%f"
)

This should create a registry file your My Documents folder called RegKeys.reg that will contain all of the keys you are deleting.

Finally, if you are a real stickler for organization (like I can be), you can nest a pair of loops that will allow you to create a seperate file for the context menu entries associated with each program. To do this you would create a directory that would have all the text files with your list of reg keys in it. (I've never actually tried doing something like this yet, but it works great in theory. :D)

for /f %%g in ('dir /b RgTxtDir\*.txt') do (
 for /f "tokens=*" %%f  in ('type %%g') do (
    reg export "%%f" >> "%userprofile%\My Documents\Registry Backups\%%g.reg"
    reg delete "%%f"
    )
)

This pair of loops should provide you with set of files in a subdirectory of your My Documents folder called Registry Backups called File1.txt.reg, etc...

Hope this helps you out somewhat. Sorry, but you are still on your own for actually compiling the list. (I will gladly make use of any list you do compile, though. :P)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...