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

Discussion in 'Windows 7 Help and Support' started by pstein, Apr 23, 2014.

  1. pstein

    pstein Honorable Member

    Joined:
    Mar 20, 2010
    Messages:
    347
    Likes Received:
    0
    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
     
  2. badrobot

    badrobot Senior Member

    Joined:
    Jun 14, 2012
    Messages:
    1,020
    Likes Received:
    102
    The native utility doesn't work for you?

    defaultprog.
     
  3. pstein

    pstein Honorable Member

    Joined:
    Mar 20, 2010
    Messages:
    347
    Likes Received:
    0
    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
     
  4. badrobot

    badrobot Senior Member

    Joined:
    Jun 14, 2012
    Messages:
    1,020
    Likes Received:
    102
    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.
     
  5. pstein

    pstein Honorable Member

    Joined:
    Mar 20, 2010
    Messages:
    347
    Likes Received:
    0
    This is for ONE single extension!.
    As I said earlier I need a program to replace for MULTIPLE extensions at once
     
  6. badrobot

    badrobot Senior Member

    Joined:
    Jun 14, 2012
    Messages:
    1,020
    Likes Received:
    102
    Just trying to help. How many thousands of extensions do you need to work with? A "No, thank you" would be nice.


    Cheers!
     
  7. whs

    whs Extraordinary Member

    Joined:
    Sep 17, 2009
    Messages:
    1,541
    Likes Received:
    106
    There is no such a program. But in Control Panel\Programs\Default Programs\Set Associations you can change the associations quickly.
     
  8. Josephur

    Josephur Windows Forum Admin
    Staff Member Premium Supporter

    Joined:
    Aug 3, 2010
    Messages:
    1,019
    Likes Received:
    125
    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... :)
     
    pstein likes this.
  9. Josephur

    Josephur Windows Forum Admin
    Staff Member Premium Supporter

    Joined:
    Aug 3, 2010
    Messages:
    1,019
    Likes Received:
    125
    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.
     

Share This Page

Loading...