Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using Windows 7 64Bit SP1.
I want to open .exe files with an application (a decompiler, actually). Is there a way to display the open with dialog for these files in the right click menu, or something similar?

share|improve this question
    
The only way I know would break your ability to launch programs, and the way I know, is the only way to do this. –  Ramhound Oct 23 '12 at 16:22
add comment

2 Answers 2

Well, let me post my answer in case no one comes up with a better one.

The easy way to get functionality that resembles what I'm looking for is to edit the SendTo menu. This menu simply displays all the files in the user's SendTo folder, and passes the selected file as a command line parameter whenever a SendTo action is chosen.
While this functionality isn't exactly what I'm looking for, it might fit the bill.

All we need to do is navigate to the SendTo folder, which in Windows 7 is located in the path %UserProfile%\AppData\Roaming\Microsoft\Windows\SendTo and add a shortcut to the program. This won't associate any file extensions with the program; the link will be visible no matter what file we choose. It doesn't involve messing around with the dreaded Registry though. And, well, now that SendTo menu would become useful for something at least.

share|improve this answer
    
I put Notepad into my SendTo menu, and I find that very useful. –  Scott Oct 23 '12 at 20:19
add comment

Context Menu Handlers

The answer you posted to your own question is indeed one way that you could do it. The method you describe is known as "adding a handler to the context menu" or "creating a context handler". You can use those terms to do more googling to find further information.

You might prefer to create a custom context handler to be a little bit cleaner (i.e. less clicks) in your workflow. There are a couple of different ways to achieve this- creating a custom entry.

Using assoc and ftype Utilities

These are command-line tools that were specifically created to manipulate the handlers/applications designated for each file-type. First, to explicitly define two terms. Forgive me if these are already obvious to you. They seem to cause confusion for most people though.

  • File Extension- this is the "." plus the 3/4 characters that are found at the end of almost every file assuming MS Windows OS conventions. The OS may be configured to hide the extension for "known file types", but change that under "folder options". for specific directories or globally across the filesystem.
  • File Type- Distinct from, but related to, file extensions. A "file type" encapsulates several file extensions under a single abstraction/concept. This is a label. It is often the name/pronunciation for its associated extension. When you see ".txt" you say "textfile". ".txt" is the extension and "textfile" is the file type.

For example, the ".htm" and ".html" file extensions are both encapsulated by the "htmlfile" file type. Now for some examples using the assoc and ftype utilities from the command line. Open a terminal (Window Key + "R" and a "run" prompt should appear, enter "cmd.exe", click "ok" button or just hit enter).

$> assoc .html
.html=htmlfile
$> assoc .htm
.htm=htmlfile
$> ftype htmlfile
htmlfile="C:\Program Files (x86)\Microsoft\Internet Explorer\iexplore.exe" "%1"

These utilities can also be used to assign values to either extensions or file types. You can also edit the registry directly or use one of any number of utilities that assist you in manipulating these values.

In your question you specifically mention Open", so I am assuming that you know, at least a little bit, about "verbs" in the context menu. "Edit" is another common verb. You probably don't want to override the verb associated with the double-click. It is perfectly fine to create a new verb called "disasm" and have it show up in the context menu near the top so that R-click->Disasm is a quick process for you to execute.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.