Ok. The only way to do that in Windows 7 is to edit the registry.
1. To set the default action, using the registry: 1. Open a CMD prompt and type: assoc .extension Example: assoc .bat This will return: .bat=batfile
2. Use regedit.exe to navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell where batfile is the string returned from step 1.
3. Double-click the (Default) Value Name and set the data value of this string to the name of the default action. Example: Set the (Default) string to edit. 4. Exit the Registry Editor.
Hey nice find - that works nicely however it still doesn't solve my particular issue.
I probably should have been more clear in the question - the part about changing the default action was a reference of where in XP you look to find what I'm looking for in 7.
What I'm trying to do is leave the default action the same (open) but add arguments to the command line (in particular i want VLC player to automatically open files with a 3000ms buffer which I can do in a per file basis manually with VLC with the command lin, but I want it to happen every time I double click a file)
You can do that with that reg hack. You just have to figure out the correct command string to do it.
So if you are trying to change the startup for a .avi. doing assoc .avi will return the value .avi=VLC.avi
Go back to that same classes registry area and look for VLC.avi then from there go to shell>Play>Command the default action for that should say: "C:\Program Files\VideoLAN\VLC\vlc.exe" --started-from-file "%1"
add in your switches between the %1 and the " So (and I don't know the commands) but if the switch to set a 300ms pause was /300ms the command would look like: "C:\Program Files\VideoLAN\VLC\vlc.exe" --started-from-file "%1 /300ms"
Again you may have to play around with it a little to get it working right, but that's the basics. My syntax may be slightly off but just play around and you'll get it. You can't muck anything up. If you are worried save that registry key first before you make any changes.
Hey kryyst, I read your answer and it worked great for me. I was so greatful i registered just to thank you :) so thanks, i was looking for a solution for a long time (ever since i got windows 7)
when i double click on any icon it opens but i want to change it as per my reqirement like on double click explore should be the first option ,HOW?????
Right click on the file in question. Choose open with, select the program you want to be the default for that file time - note this will change it for all files of that extension. Then below the program selection box put a check mark in the 'always open with' box.
Comments
I looked through there and I still can't seem to find what I'm looking for.
As an example - when I double click say a .txt file it will open the file with the default program associated with that.
In XP you could set it to do something else, say print the file instead of open it.
Specifically what I'm trying to do is add command line parameters to VLC when I click on .avi files - I can do it in XP.
1. To set the default action, using the registry: 1. Open a CMD prompt and type:
assoc .extension
Example: assoc .bat
This will return:
.bat=batfile
2. Use regedit.exe to navigate to:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell
where batfile is the string returned from step 1.
3. Double-click the (Default) Value Name and set the data value of this string to the name of the default action.
Example: Set the (Default) string to edit.
4. Exit the Registry Editor.
I probably should have been more clear in the question - the part about changing the default action was a reference of where in XP you look to find what I'm looking for in 7.
What I'm trying to do is leave the default action the same (open) but add arguments to the command line (in particular i want VLC player to automatically open files with a 3000ms buffer which I can do in a per file basis manually with VLC with the command lin, but I want it to happen every time I double click a file)
Hope thats more clear
So if you are trying to change the startup for a .avi.
doing assoc .avi will return the value .avi=VLC.avi
Go back to that same classes registry area and look for VLC.avi
then from there go to shell>Play>Command
the default action for that should say:
"C:\Program Files\VideoLAN\VLC\vlc.exe" --started-from-file "%1"
add in your switches between the %1 and the "
So (and I don't know the commands) but if the switch to set a 300ms pause was /300ms
the command would look like:
"C:\Program Files\VideoLAN\VLC\vlc.exe" --started-from-file "%1 /300ms"
Again you may have to play around with it a little to get it working right, but that's the basics. My syntax may be slightly off but just play around and you'll get it. You can't muck anything up. If you are worried save that registry key first before you make any changes.
thanks so much