locked
How to Associate a NON-Default Program with a File Extension? RRS feed

  • Question

  • I'm trying to add a non-default program association to a particular file extension, so that I can right click on the file and choose it.  I already have a default program associated with Open and I want to keep that.  What I want to do is add another item to the context menu.

    Specifically, for a .wbt (WinBatch) file on my Windows 7 x64 system I get the following Menu when I right-click the file:



    I want to add a "Compile" entry, between Open and Print, that will start a different program with the selected file name as an argument.  I'm just not finding the GUI interface to do this.

    This used to be pretty easy to configure with the File - Options - Folder Options menu in Windows Vista and earlier.  However that menu has been eliminated in Windows 7, and the Control Panel\Programs\Default Programs\Set Associations dialog doesn't seem to offer any choices I can see other than [re]defining the default program for Open.

    Maybe I'm just tired, but I'm not seeing how to set this up.  Am I just missing something obvious?

    FYI, the registry can easily be tweaked to accomplish this, by setting up the key HKEY_CLASSES_ROOT\WBT_auto_file\shell\Compile\command (after having found out that WBT_auto_file is associated with .wbt), but that's just ludicrous to have to do.  There really needs to be a way to configure this via the GUI.

    Thanks.

    -Noel
    Sunday, January 31, 2010 8:43 PM

Answers

  • The old File Types dialog that would let you accomplish this back in the Windows 2000/XP days is gone (sadly).  Microsoft's TechNet Magazine Website explains why:  http://technet.microsoft.com/magazine/57f0c8c5-28cc-42fa-bb20-b04bb0139ff5

    You can still do what you want with some careful command prompt and/or registry modifications (assoc is the command for the cmd prompt), but it's fairly advanced and I haven't tried it myself yet.  There are guides on the web though.

    Tip: when searching for how to do this, search for how to do it in Vista:  lots of people wrote how-to steps back then, and the steps are the same in Windows 7.





    If this was helpful, please vote by clicking the green triangle. If it solves the issue, click Propose as Answer. Thanks!
    • Marked as answer by Linda Yan Wednesday, February 10, 2010 1:26 AM
    Thursday, February 4, 2010 7:30 AM
  • Hope this article helps: Creating Context Menu Handlers

     

    • Marked as answer by Linda Yan Wednesday, February 10, 2010 1:26 AM
    Monday, February 8, 2010 9:08 AM

All replies

  • Noel, what about using PC Mags Context Menu Editor

    It runs under Win 7 Pro X64 for me. Allows you to add new entries for specific file extensions.
    Rich
    Monday, February 1, 2010 1:52 AM
  • Thanks.  Honestly I expected someone would point me to a hidden configuration feature I missed somewhere.

    Just a glance at that PC Magazine page makes me think that software is utterly ancient.  Has no better/newer software been written?

    And why should Microsoft maintain run-time support for one of the most useful features of the system, then remove the ability to set it up except from programmatic means? 

    As with many recent changes, this sure feels like they're dumbing-down the operating system, because none of us could possibly understand it anyway...  WRONGO, MOOSEBREATH!

    Okay, so the ability to set up associations has been removed from the Explorer menu and hidden in a separate control panel applet.  Why not make it possible THERE to configure all of it, via an [ Advanced ] button or something?  That reeks of just plain laziness on the part of whatever Microsoft engineering group did the work.  :(  C'mon, guys, you need to do better than this.  These features are what people are paying money for!

    -Noel
    Monday, February 1, 2010 4:49 PM
  • Noel, it is ancient, but it still works. I tested it before posting.
    I'm also curious to see if someone comes up with a built-in way to do this, other than editing the registry.
    Rich
    Monday, February 1, 2010 5:52 PM
  • You can use the "Open with" option in the right-click menu, and then select the program you would like to start the file. If the program is not in the list, you can manually browse it by clicking the Browse… button.

     

    Wednesday, February 3, 2010 6:51 AM
  • Thank you, Linda.

    Yes, I saw the Open With functionality, but that's nowhere near as convenient as associating another common action with the file type directly.  In my case I want double-click on the script to run it (e.g., for testing), and Right-click -> Compile to compile it.  I managed to accomplish this by writing specific entries to the registry via Regedit.exe, so we know that Explorer is still quite capable.  It's just that Microsoft has chosen to remove the ability to manage this feature from the user interface

    This was the desired result:



    I believe the removal of this configurability must have been an oversight in the reimplementation of the Windows 7 interface, and respectfully request that Microsoft add it back in.  It's just another way people can configure Windows to be more useful.

    If removal of this kind of functionality is being done on purpose, it's clear decisions are being made by incapable people, and Windows WILL lose market share.  These are the things people pay for!

    Thanks.

    -Noel
    Wednesday, February 3, 2010 2:44 PM
  • The old File Types dialog that would let you accomplish this back in the Windows 2000/XP days is gone (sadly).  Microsoft's TechNet Magazine Website explains why:  http://technet.microsoft.com/magazine/57f0c8c5-28cc-42fa-bb20-b04bb0139ff5

    You can still do what you want with some careful command prompt and/or registry modifications (assoc is the command for the cmd prompt), but it's fairly advanced and I haven't tried it myself yet.  There are guides on the web though.

    Tip: when searching for how to do this, search for how to do it in Vista:  lots of people wrote how-to steps back then, and the steps are the same in Windows 7.





    If this was helpful, please vote by clicking the green triangle. If it solves the issue, click Propose as Answer. Thanks!
    • Marked as answer by Linda Yan Wednesday, February 10, 2010 1:26 AM
    Thursday, February 4, 2010 7:30 AM
  • Hope this article helps: Creating Context Menu Handlers

     

    • Marked as answer by Linda Yan Wednesday, February 10, 2010 1:26 AM
    Monday, February 8, 2010 9:08 AM