Windows 7 How to assign a new program to mulitple (!) extension at once?

pstein

Extraordinary Member
Ok there are many guides on how to assign ONE certain extension (e.g. .aaa) to one program
myprog.exe so that a double click on a file myfile.aaa will automatically start the program and load the file.

But what I need is a similar but different way of assignment.

I want completely replace existing (or assign new) MULTIPLE extension assigments.
For practical purposes you can think of a videoplayer myplayer.exe which covers all extensions

.avi .mpg .mkv .mpeg .ogg .flv ........

Sometimes the new programs offer inside their settings dialog an option to setup new associations
but sometimes they don't.

So I could now start to investigate all possible extensions which should be treated by the new program and assign them individually step-by-step manually.

As you can imagine this is unhandy and annoying.

So what I need is a cmdline (or GUI based) program which assigns multiple extensions IN ONE STEP to one new program like

associatenew.exe "D:\video\myplayernew.exe" .avi .mpg .mkv .mpeg .ogg .flv

Is there such a utility?

Peter
 
The native utility doesn't work for you?

defaultprog.jpg
 
This works only for programs which are listed at the left side.

But what if the program is installed as portable?
It will NOT appear at the left side
 
Right click on any file with the extension that you want to set a default program to, then select "Open with" >>> "Choose default program..." then browse to the location of the portable program.

defaultprog2.jpg
 
This is for ONE single extension!.
As I said earlier I need a program to replace for MULTIPLE extensions at once
 
Just trying to help. How many thousands of extensions do you need to work with? A "No, thank you" would be nice.


Cheers!
 
There is no such a program. But in Control Panel\Programs\Default Programs\Set Associations you can change the associations quickly.
 
Well you could create a batch file and use the assoc program.

Run this as an Administrator...

assoc .ext1=myprogram
assoc .ext2=myprogram
assoc .ext3=myprogram
assoc .ext4=myprogram
ftype myprogram="C:\wherever\myprogram.exe"

Of course a clever person would make a for loop for this... :)
 
I almost forgot you do need to pass the filename parameter along with your program's binary.

So a better example would be ftype myprogram="C:\wherever\myprogram.exe" "%1"
Without the %1 variable it'll launch the program perhaps, but not pass along the filename for it to open.
 
Back
Top