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: Alternate parameters for opening filetype with program

18 Dec 2018   #1
PDXmatt

Windows 7 Professional x64
 
 
Alternate parameters for opening filetype with program

There are some programs that I can't get to open a file by double-clicking on it. If I associate the filetype in the registry with shell\open\command: "Path\Program.exe" "%1" it just opens the program, but doesn't open the file. It's a problem I've had with numerous programs. I know many programs might have specific arguments they use, but I just want some general advice. What are some common parameters/arguments that might work with some of these programs? ("Path\Program.exe" "%L") ("Path\Program.exe" --started-from-file "%1") ("Path\Program.exe" /open "%L") ("Path\Program.exe" -run "%1") are some examples of what I'm looking for.


My System SpecsSystem Spec
.
19 Dec 2018   #2
wither 2

Windows 7 Pro SP1 64 bit
 
 

Hi PDXmatt-

Go to Control Panel, Default Programs. There are a couple of ways of handling this.

Click on "Associate a file type............". You can look up the extensions that you want a particular program to open and set that program as the default.

Or, you can select "Set Default Programs" and select a program and set it to open all file types that it can open.

Does that help?
My System SpecsSystem Spec
20 Dec 2018   #3
Alejandro85

Windows 7 Ultimate x64
 
 

There is no standard at all, each and every program has its own convention and parameters. If a specific program fails to do what you want, look at its command line documentation for the correct set of parameters. It may also be entirely possible that the program doesn't support command line interface at all and it's simply incapable of directly opening a file.

The most common way of doing it is precisely your example, simply passing the target file name as a parameter and nothing else. When doing a shot in the blind "Path\Program.exe" "%1" is always a good starting point.
My System SpecsSystem Spec
.

22 Dec 2018   #4
PDXmatt

Windows 7 Professional x64
 
 

Quote   Quote: Originally Posted by wither 2 View Post
Hi PDXmatt-

Go to Control Panel, Default Programs. There are a couple of ways of handling this.

Click on "Associate a file type............". You can look up the extensions that you want a particular program to open and set that program as the default.

Or, you can select "Set Default Programs" and select a program and set it to open all file types that it can open.

Does that help?
Unfortunately that still just associates the filetype with the "Path\Program.exe" "%1" parameter, which I can do manually in the registry.
My System SpecsSystem Spec
22 Dec 2018   #5
PDXmatt

Windows 7 Professional x64
 
 

Quote   Quote: Originally Posted by Alejandro85 View Post
There is no standard at all, each and every program has its own convention and parameters. If a specific program fails to do what you want, look at its command line documentation for the correct set of parameters. It may also be entirely possible that the program doesn't support command line interface at all and it's simply incapable of directly opening a file.

The most common way of doing it is precisely your example, simply passing the target file name as a parameter and nothing else. When doing a shot in the blind "Path\Program.exe" "%1" is always a good starting point.
Yeah, I noticed after searching "shell\open\command" in RegScanner that there isn't really any standard parameters other than [B]"Path\Program.exe" "%1"[B]. The programs I've had trouble with never seem to have any commandline documentation, and searching on Google never helps. I think you're right that these programs just aren't able to directly open a file, which I figured was the case but I was hoping maybe there was a way.
My System SpecsSystem Spec
22 Dec 2018   #6
wither 2

Windows 7 Pro SP1 64 bit
 
 

I assume you're inputting the path to/and actual .exe file for the program you're associating a file type with in the Control Panel, Default Programs. If you are, doesn't that file type open in it's associated program when you double click on it?

Perhaps I'm misunderstanding the problem.
My System SpecsSystem Spec
23 Dec 2018   #7
PDXmatt

Windows 7 Professional x64
 
 

Quote   Quote: Originally Posted by wither 2 View Post
I assume you're inputting the path to/and actual .exe file for the program you're associating a file type with in the Control Panel, Default Programs. If you are, doesn't that file type open in it's associated program when you double click on it?

Perhaps I'm misunderstanding the problem.
What I mean is when you associate a file type with some programs it won't open the file with the program, it just opens the program by itself. I guess some programs just won't open files directly like that.
My System SpecsSystem Spec
23 Dec 2018   #8
wither 2

Windows 7 Pro SP1 64 bit
 
 

Thanks. I missed that distinction.

For a problem program, go to Control Panel, Programs and Features. Click on the program and select Change. Select the Repair option and run it.

Does that help?
My System SpecsSystem Spec
06 Jan 2019   #9
PDXmatt

Windows 7 Professional x64
 
 

Quote   Quote: Originally Posted by wither 2 View Post
Thanks. I missed that distinction.

For a problem program, go to Control Panel, Programs and Features. Click on the program and select Change. Select the Repair option and run it.

Does that help?
No, the issue is just getting the program to open files directly. Also the programs I have this problem with don't usually have installers anyway.
My System SpecsSystem Spec
06 Jan 2019   #10
wither 2

Windows 7 Pro SP1 64 bit
 
 

Can you identify some of the programs that don't work as expected?
My System SpecsSystem Spec
Reply

 Alternate parameters for opening filetype with program




Thread Tools




Similar help and support threads
Thread Forum
My pc isn't opening any program after...
I just removed some viruses in safe mode +net connection with some antiviruses and now after I completed it when I clicked restart it took a bit to boot, I mean it stays for a couple of minutes at welcome and then the screen becomes black for around 20 sec. Nothing works, everything that I open...
BSOD Help and Support
library for filetype?
hi all! is there a method i can let w7 collect all the files from the type *.xxx (spread all over the system) in a single libray? regards, markus
General Discussion
all program help with opening them
Hello yesterday I was learning how to code programs and I tried to open calculator with my coding program dev c++ and then I opened it I didn't understand it but I looked back on my desktop and every thing was opened with dev c++ so how can I fix this?Yes I tried system restore and nothing happened...
Software
Auto opening of program??
Using XP I had written a program that opened automatically on certain dates when the computer was first turned on. I have the same program but it doesn't open on Win7 on the dates it is program to open. I believe I was able to have the program set to open by enter "RUN" and select programs to be...
General Discussion
How do you revert a filetype back to unknown..?
Hi, I've accidently set another .cnf filetype to be known, as well. It's just so aggravating to see them have an icon as if they're good to open..how can I make them to open with nothing once again..? http://img.photobucket.com/albums/v59/MetalMilitia/ack.jpg
General Discussion


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 18:17.
Twitter Facebook Google+