404 Tech Support

Clean up your Context Menu

The context menu (what pops up when you right-click) is one of the most popular items to clutter; a lot of programs will add their shortcuts or filetypes to the menu when they get installed. It’s also a very under-used, convenient location that you could put your frequently used functions and shortcuts. This post should show you how to tame the context menu and make it work for you.

One of the things that I use the context menu for the most frequently is for creating new folders or new text documents. Unfortunately, a lot of other clutter gets added to the context menu as programs are installed. As the list grows larger, it can sometimes take longer for the context menu or the New sub-menu to appear. In order to speed it up and make it more convenient, we just need to clean it up and get those unused entries out of our way.

Below you can see my context menu when I just right-click on my desktop. The New menu is cluttered with things I will never use and the reason I began investigating this was that the Text Document disappeared from the menu. This post will show how to retrieve the Text Document entry, remove any unwanted entries, and add any other file types.


Tweak UI

For the first part of this article, we’ll be using Tweak UI. Tweak UI is part of the PowerToys for Windows XP package and provides a convenient interface to a lot of system-level tweaks and changes that are normally made only through the registry. It works for both Windows XP and Server 2003, and making it work for Vista is covered later in this article.

After downloading and running through the setup for Tweak UI, you can launch the program and you’ll see a window like the screenshot directly below. In the left-hand pane select Templates and then you will see the right-pane reflect your Context Menu -> New sub-menu. In order to remove the entry from showing up on your context menu, you can simply uncheck the box in front of the different files that you don’t want. You can also select the entry and hit the Delete button if you want to get rid of the item for good. Hit Apply and you’ll see the changes reflected the next time you right-click the desktop.

If you want to add an item to the New menu and it’s listed on this page already but unchecked, you can just put a check in front of the item and Apply the change.

If the item is not listed in Tweak UI, you’ll need to create a new template. You can see the Create button in Tweak UI, but we’ll need to create our template first.

As I explained earlier, my New Text Document entry inexplicably disappeared from the context menu. These next few steps will show you how to get it back but these steps can be modified for any file type really.

1. Go into Notepad and create a new blank text file.

Save it somewhere convenient so you can point Tweak UI at it in a few steps. Name it something like New Text Document.txt.

You should have this:

Back in Tweak UI, still under Templates, click on the Create button.

Then browse to the New Text Document.txt file that you just created and hit Open.

Now it’ll be listed in the Templates. Verify that there is a checkmark in front of it and hit Apply and you should see it in the New sub-menu of the context menu.

TweakUI on Vista

TweakUI is a PowerToy for Windows XP and will not install on Vista. There are some Vista-compatible alternatives, like TweakVI, but they don’t have the same functionalities or thoroughness as TweakUI and I wouldn’t recommend it. Instead, you can migrate TweakUI to Vista.

Download and install 7-Zip if you don’t have it already.

Download the Tweak UI Powertoy setup file from Microsoft. You can try to install it, but you’ll just get a message saying that the install is not allowed.

Once you have 7-Zip installed and TweakUI downloaded, you’re ready to continue. Open the TweakUiPowertoySetup.exe file in 7-Zip. You can either do this by launching the 7-Zip program and browsing to the file. Otherwise, you can right-click on the file and  go to 7-Zip -> Open Archive. This step should result in a screenshot similar to below, looking into the contents of the setup file.

You can see the license agreement and the TweakUI executable. Drag (or extract) at least the TweakUI.exe file to somewhere convenient, like your Desktop.

Right-click on the newly extracted TweakUI and go to Properties. On the Properties window that comes up, switch to the Compatibility tab. Put a check in front of “Run this program in compatibility mode for:” and change the drop-down menu to say Windows XP (Service Pack 2). Then hit Ok.

Next you can run TweakUI by double-clicking it. When you do, you’ll get the message below. You can just click Run Program. Be warned. Tweak UI will work for Vista but it may have unforeseen consequences. From what I tested out, the Templates module worked fine. I cannot vouch for the other components and you use the program at your own risk.

Similar to the XP/Server 2003 interface, choose Templates from the left pane. Uncheck or delete anything you don’t want in the New sub-menu or use the Create button with a new template to add more options exactly like above.

Manual Changes via RegEdit

Besides using Tweak UI, you can make these changes manually directly in the registry. Here’s a picture of my New sub-menu before making any changes. Looking at this, I want to get rid of the Bitmap Image and the Contact entries.

There was also a Briefcase entry but I removed it in testing to verify the process. Open up RegEdit (with standard disclaimers to be careful in the registry and backup everything before you make changes.

Open RegEdit and browse to HKEY_LOCAL_MACHINESOFTWAREClasses[extension] and Delete the ShellNew key.

Deleting the ShellNew key will get rid of the menu, but you can also leave the entry in a more recoverable state just by deleting the NullFile value inside the ShellNew key. This will also remove the entry from the New sub-menu.

After deleting the NullFile from:

HKLMSOFTWAREClasses.bmpShellNew

HKLMSOFTWAREClasses.contactShellNew

you can see in the screenshot below that the Bitmap and Contact entries were removed.

You can also create new entries to the New sub-menu through the registry. Just find the extension you want and add a ShellNew Key to the HKLMSOFTWAREClasses[extension] key and a String Value named NullFile under the ShellNew key.

For example, I wanted to add an entry in the New sub-menu for batch files. I went to HKLMSOFTWAREClasses.bat and added a key called ShellNew. Then inside that key, I also added a new String Value called NullFile.

As you can see from the screenshot below, the Windows Batch File has now been added to my context menu just by making the registry change above.

Change your right-click options per file type

ContextEdit has the ability to change what you see when you right-click on a file. You normally get different options depending on what type of file it is. For example, if you right-click on an MP3, you get the options to play it in Windows Media Player, Add it to the WMP playlist, play it in VLC (or other media players that you have on your computer).

Download and install ContextEdit and you’ll have an easy interface to change the options per extension. As you can see below, when I right-click on a batch file (.bat) I used to get four options: Edit, Edit with Visual Studio, Open, and Print. I never use the ‘Edit with Visual Studio’ or ‘Print’ options, so I might as well get those out of my way. With ContextEdit, I browse in the long list of the left-side to find the extension I want to change, .bat. Upon clicking that extension, the ‘Find master file type’ button near the bottom became enabled, so I clicked that to take me to a master entry, which would effect all other extensions that were also registered as Windows Batch files. It then shows me the Shell commands associated with this file type. I simply uncheck ‘EditWithVS’ and ‘print’ and the setting is applied immediately. My desired changes are made.

You can permanently delete the options, add new ones, or edit the existing commands with this tool as well.

Add More Tools

FileMenu Tools provides even more tools for your context menu. It can be set to show on the full menu or just as a sub-menu. With all of the tools enabled, it makes the context menu a bit unweildly. While all of the tools could be useful in certain situations, you can pair it down to those that you will use the most or find the most useful to have a click away. In order to remove options, you launch FileMenu Tools and, similar to the rest of the tools covered, just uncheck the box in front of the command you don’t want. You can also add more commands if you have something that’s not listed.

A few tools from this toolset that I found very interesting:

I narrowed this toolset down to the above four, but still find this utility incredibly helpful and adding convenience. You can also edit the ‘Send to…’ menu on the Context menu and some file type related entries with this tool as well. Just change tabs near the top.

More with Vista

In Vista, you can find a few Easter Eggs in the context Menu to mirror some of the functions these third-party apps provide. For example, hold down shift and right-click on a file or folder and you’ll get additional options. As you can see from the screenshot below, ‘Open Command Window Here‘ and ‘Copy as Path‘ are added to the menu. ‘Open Command Window Here’ will open a command prompt with the selected directory (or current directory if you just click inside a folder instead of on a folder) as the current working directory. The ‘Copy as Path’ option will put on your clipboard the path to what you clicked on. The next time you paste into a text field, you’ll get the path to that directory or file, like: C:downloadsmisc