Creating custom commandline for file association table

NormR2001

New member
Local time
10:49 PM
Messages
4
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

OS
Windows 7 Starter
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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell Precision M6500 / Dell Insprion 3847
OS
Windows 7 Pro 32bit / Windows 7 Professional
CPU
Intel Core i7-620M Duel Core 2.66GHz / Intel Core i5-4460
Memory
4.0 GB / 8.0 GB
Graphics Card(s)
1.0 GB NVIDIA Quadro FX 2800M / Intel HD Graphics
Screen Resolution
1440x900 / 1920x1080
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

OS
Windows 7 Starter
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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell Precision M6500 / Dell Insprion 3847
OS
Windows 7 Pro 32bit / Windows 7 Professional
CPU
Intel Core i7-620M Duel Core 2.66GHz / Intel Core i5-4460
Memory
4.0 GB / 8.0 GB
Graphics Card(s)
1.0 GB NVIDIA Quadro FX 2800M / Intel HD Graphics
Screen Resolution
1440x900 / 1920x1080
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

OS
Windows 7 Starter
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

OS
Windows 7 Professional x64
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

OS
Windows 7 Starter
Back
Top