Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Creating custom commandline for file association table

07 Sep 2011   #1
NormR2001

Windows 7 Starter
 
 
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 System SpecsSystem Spec
.
07 Sep 2011   #2
SundRance

Windows 7 Pro 32bit / Windows 7 Ultimate x64
 
 

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 System SpecsSystem Spec
07 Sep 2011   #3
NormR2001

Windows 7 Starter
 
 

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 System SpecsSystem Spec
.

08 Sep 2011   #4
SundRance

Windows 7 Pro 32bit / Windows 7 Ultimate x64
 
 

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 System SpecsSystem Spec
08 Sep 2011   #5
NormR2001

Windows 7 Starter
 
 

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 System SpecsSystem Spec
08 Sep 2011   #6
fjawodfc

Windows 7 Professional x64
 
 

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 System SpecsSystem Spec
08 Sep 2011   #7
NormR2001

Windows 7 Starter
 
 

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 System SpecsSystem Spec
Reply

 Creating custom commandline for file association table




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Problems creating default association for Yahoo mail
I have a new computer. I thought I had Yahoo installed on the new computer because I can send and receive email. But I cannot send an attachment or photo. "There is no email program associated.... Create an association in the default programs control panel." I have tried several different things...
Browsers & Mail
Set file association for a file (dds) to Shell Common that execs it!
I accidentally set the default file format for a dds (DirectDraw Surface) to Windows shell common. It tries to execute it but obviously fails giving this error: I've tried everything. Modified registry keys, use slightly different solutions, but I just can't get it working. Does anyone have a fix...
General Discussion
Creating an Email Association
I use Yahoo Mail and I simply want to attach images to emails without having to go through the laborious process of resizing them manually. Image processing software has the ability to do just that but I get the message that there is no associated email program and I am invite to create an...
Browsers & Mail
Master file table corrupt
Hello, I purchased a 1 TB Seagate Hard Disc about four months ago.It has two Partitions One 50 GB with Windows 7 New and other a 950 GB with movies,music important documents etc.I also have two more Internal Hard discs with Windows 8 and another windows 7.For last one week or so had problems in...
General Discussion
How do I change a file's file type (not only file association)?
I need to change a zip file to an epub file. I have heard this can be done, but when I add the .epub after the file name, I notice the file is still actually zip type file when I right click properties. This is causing a problem when I try to open it in in different ebook reader programs. I...
General Discussion
File table rebuilding software?
Ok, i've a 1TB drive, pretty full with music, and its lost both file tables when the system crashed during a defrag :/ Windows reports the drive corrupt and unreadable, and thus, cannot open it. chkdsk reports it as a ntfs drive, but cannot continue. damage is beyond its capabilities. Spinrite...
Hardware & Devices


Our Sites

Site Links

About Us

Find 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 11:46.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App