- Thread Author
-
- #1
As you know some file may be opened by multiple installed programs.
Assume I have 3 picture viewers installed for viewing *.jpg files.
Currently the default program for opening these *.jpg is "aaa.exe"
In the future I want to let the *.jpg open (by double clicking in Windows Explorer) by a second program bbb.exe
Associating *.jpg extension with assoc and ftype does not help.
UserChoice has higher priority than default association.
So I need a way to modify the "OpenWith" User Preference as well.
I want such a modification by command line command and not by clicking through GUI.
Keep in mind that in reality I have to do this for a dozend of extension every time.
Putting commands in batch script would be helpful.
So again: How do I modify the "OpenWith" user preferences for lets say extension *.jpg to program bbb.exe from cmdline?
thank you
Peter
Assume I have 3 picture viewers installed for viewing *.jpg files.
Currently the default program for opening these *.jpg is "aaa.exe"
In the future I want to let the *.jpg open (by double clicking in Windows Explorer) by a second program bbb.exe
Associating *.jpg extension with assoc and ftype does not help.
UserChoice has higher priority than default association.
So I need a way to modify the "OpenWith" User Preference as well.
I want such a modification by command line command and not by clicking through GUI.
Keep in mind that in reality I have to do this for a dozend of extension every time.
Putting commands in batch script would be helpful.
So again: How do I modify the "OpenWith" user preferences for lets say extension *.jpg to program bbb.exe from cmdline?
thank you
Peter
Solution
Ah yes I missed that bit, you are correct that user defined classes stored at HKEY_CURRENT_USER\Software\Classes will override this.
Therefore I would suggest using the command line "reg add" and "reg delete" to modify keys in that area (or possibly just nuking the association in there and then using ftype and assoc)
Therefore I would suggest using the command line "reg add" and "reg delete" to modify keys in that area (or possibly just nuking the association in there and then using ftype and assoc)
- Joined
- Aug 3, 2010
- Messages
- 1,289
To view/change associations via command line you'll need to look at assoc, and ftype commands.
For instance to create a new association and file type...
assoc .mytext=MyText
ftype MyText=notepad.exe %1 %*
For instance to create a new association and file type...
assoc .mytext=MyText
ftype MyText=notepad.exe %1 %*
- Joined
- Aug 3, 2010
- Messages
- 1,289
Ah yes I missed that bit, you are correct that user defined classes stored at HKEY_CURRENT_USER\Software\Classes will override this.
Therefore I would suggest using the command line "reg add" and "reg delete" to modify keys in that area (or possibly just nuking the association in there and then using ftype and assoc)
Therefore I would suggest using the command line "reg add" and "reg delete" to modify keys in that area (or possibly just nuking the association in there and then using ftype and assoc)
Similar threads
- Solved
- Replies
- 2
- Views
- 758
- Solved
- Replies
- 3
- Views
- 1K
- Solved
- Replies
- 2
- Views
- 12K