Creating custom commandline for file association table


  1. Posts : 4
    Windows 7 Starter
       #1

    Creating custom commandline for file association table


    HI,
    How can I create a custom command line to be used when I double click on a file with a specific extension. For example for a .jar file I'd like to have this:
    javaw.exe -jar "%1" -myOpts

    Can you have more than one custom command line for an extension and use the RightClick context menu to chose the one you want to use?

    Thanks,
    Norm
      My Computer


  2. Posts : 126
    Windows 7 Pro 32bit / Windows 7 Professional
       #2

    Can you not just right-click the file and choose Open with? Once you have browsed to the software and open the data file, that program should thereafter show up in the Open with list.

    Not sure about creating new system menu options that would react to only one file type.

    Best Wishes,
    RȘnce
      My Computer


  3. Posts : 4
    Windows 7 Starter
    Thread Starter
       #3

    Thanks for the response.
    I want to provide options on the command in addition to specifying the program to execute. See my first post. I want to execute the javaw.exe command with these options:
    javaw.exe -jar "%1" -myOpts

    %1 is where the filename is substituted into the commandline.
      My Computer


  4. Posts : 126
    Windows 7 Pro 32bit / Windows 7 Professional
       #4

    Sorry, I thought a registry edit at:

    HKLM\Software\Classes\.jar

    would do the trick, but I tested it and it didn't seem to work. You will have to wait for someone who really knows this stuff to come along and give you directions.

    Best of Luck,
    RȘnce
      My Computer


  5. Posts : 4
    Windows 7 Starter
    Thread Starter
       #5

    Wow, you have to edit the registry now?
    It used to be available via the Windows Explorer Tools menu:
    Open Windows Explorer
    Click on Tools menu
    Click on Folder Options
    Select File Types tab
    Scroll down in the "Registered file types:" list until you see an entry for JAR.
    Select the JAR entry.
    Click the Advanced button
    In the Edit File Type window scroll down the list of Actions until you see the one in bold.
    Select the bold one (The default)
    Click the Edit button
    The "Application used to perform action:" window.
      My Computer


  6. Posts : 15
    Windows 7 Professional x64
       #6

    Yes, there used to be a UI for this, and I don't know why they took it away. I've successfully added many context menu commands to the registry. Through a quick Google search I found instructions to add entries and some tools to disable/remove entries, but no tool to add new ones. Are you comfortable editing the registry?
      My Computer


  7. Posts : 4
    Windows 7 Starter
    Thread Starter
       #7

    Yes, I have been able to edit the registry.
    I wonder why MS took away the interface.
    I guess I'm glad MS left the RegEdit program.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:41.
Find Us