topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday December 4, 2024, 9:51 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Is there any way of 'saving' file associations?  (Read 12343 times)

dcsev

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 182
    • View Profile
    • Donate to Member
Is there any way of 'saving' file associations?
« on: March 24, 2015, 05:56 PM »
Hi all,
This problem has been following me for a long time. Is there any way to 'save' file associations in Windows 8.1 to a .reg file?  For example, .txt is to notepad. I have many file associations I would like to save so I don't have to keep re-associating after Windows reinstall.  I would just run all of the reg files on reinstall and not have to do them manually by hand. I have tried all of the programs listed in portable freeware, donation coder, and google search for hours and have yet to find something that does this.

I do use 'portable file associations' in XYplorer, but I really want to be able to have the file association in Windows option.

Is this possible?

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: Is there any way of 'saving' file associations?
« Reply #1 on: March 24, 2015, 06:18 PM »
Use DISM.exe to export/import file associations - see here.

dcsev

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 182
    • View Profile
    • Donate to Member
Re: Is there any way of 'saving' file associations?
« Reply #2 on: March 25, 2015, 12:22 AM »
Wow, are you kidding me.

It can't be that easy. All this time I have been looking to external solutions.

Unfortunately, I won't be able to know if it truly worked until I reinstall, but THANK YOU for the info!!

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: Is there any way of 'saving' file associations?
« Reply #3 on: March 25, 2015, 06:14 AM »
Unfortunately, I won't be able to know if it truly worked until I reinstall, but THANK YOU for the info!!

Edit the XML file to change the default program for a filetype, (make a backup first), for example:

Code: Text [Select]
  1. <Association Identifier=".nfo" ProgId="Applications\notepad.exe" ApplicationName="Notepad" />

Will redirect *.nfo files to be opened in Notepad rather than SystemInfo.

Then import using DISM, log out then in and see what happens when you open a .nfo file.

If an extension doesn't appear in the XML file it probably means that it is set to the default as when Windows was installed, (eg. .txt doesn't appear in my exported file because it still points to Notepad, even though Notepad itself has been replaced by Notepad2).

dcsev

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 182
    • View Profile
    • Donate to Member
Re: Is there any way of 'saving' file associations?
« Reply #4 on: March 25, 2015, 09:37 AM »
I see one potential problem so far. If the app itself associates itself with the registry the DISM app doesn't add the location of the application to the "ProgID".  When I export and import again on a fresh install one would reasonably assume it would know to open INI with Notepad++ but wouldn't know where N++ is.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Is there any way of 'saving' file associations?
« Reply #5 on: March 25, 2015, 12:22 PM »
I see one potential problem so far. If the app itself associates itself with the registry the DISM app doesn't add the location of the application to the "ProgID".  When I export and import again on a fresh install one would reasonably assume it would know to open INI with Notepad++ but wouldn't know where N++ is.

You could try ERUNT

But I would make a registry save of your new install before copying a saved ERUNT reg save over it.
It comes with a readme with lots of info.  There may be a way to limit the save to HKCR or a way to save HKCR by itself.  I haven't read up on file associations in a long time.  Back when I wrote an Explorer Shell Extension they didn't have both global and user association sets.  They changed it since in the old days often uninstalling a program left a "hole" in the file type associations.


Edit: also see this:
http://www.sevenforu...le-associations.html

Edit2: I see what you mean about the  value just being the exe filename with no path.

« Last Edit: March 25, 2015, 12:36 PM by MilesAhead »

Vurbal

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 653
  • Mostly harmless
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Is there any way of 'saving' file associations?
« Reply #6 on: March 25, 2015, 02:13 PM »
I would think the simplest and most effective way to do this would be using the command line file association tools - ftype and assoc.

There's a tutorial here for backing them up and restoring them from the command line. I haven't tried it myself, but it seems sound at a glance.
I learned to say the pledge of allegiance
Before they beat me bloody down at the station
They haven't got a word out of me since
I got a billion years probation
- The MC5

Follow the path of the unsafe, independent thinker. Expose your ideas to the danger of controversy. Speak your mind and fear less the label of ''crackpot'' than the stigma of conformity.
- Thomas J. Watson, Sr

It's not rocket surgery.
- Me


I recommend reading through my Bio before responding to any of my posts. It could save both of us a lot of time and frustration.

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: Is there any way of 'saving' file associations?
« Reply #7 on: March 25, 2015, 02:22 PM »
I see one potential problem so far. If the app itself associates itself with the registry the DISM app doesn't add the location of the application to the "ProgID".  When I export and import again on a fresh install one would reasonably assume it would know to open INI with Notepad++ but wouldn't know where N++ is.

If you're not going to reinstall the programs associated with the relevant filetypes why are you saving the filetypes?

dcsev

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 182
    • View Profile
    • Donate to Member
Re: Is there any way of 'saving' file associations?
« Reply #8 on: March 25, 2015, 07:54 PM »
4wd,
I don't reinstall 95% of my apps. They are all portable.  Some examples are Zoomplayer, Xnview, Notepad++.  That is my predicament. I would like to be able to easily get my file associations back on my portable apps.

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,939
    • View Profile
    • Donate to Member
Re: Is there any way of 'saving' file associations?
« Reply #9 on: March 25, 2015, 09:22 PM »
A search on the DC forum resulted in this N.A.N.Y entry. And it is my guess that it will help you out, especially with your preference of using portable software. Of course, this tool is portable as well.  ;)

dcsev

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 182
    • View Profile
    • Donate to Member
Re: Is there any way of 'saving' file associations?
« Reply #10 on: March 26, 2015, 03:13 AM »
Shades, that was the first thing I tried. It didn't work for me unfortunately.  I think I even posted in the thread for help.

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,964
    • View Profile
    • Donate to Member
Re: Is there any way of 'saving' file associations?
« Reply #11 on: March 26, 2015, 04:57 AM »
Shades, that was the first thing I tried. It didn't work for me unfortunately.  I think I even posted in the thread for help.

I think you might have missed the update the author made for you ?

Okay a new version is up check first post for download link.

Also stisev sorry I couldn't get to it sooner cause of my sickness I would appreciate if you report back on it so I know it is fixed/I still got to track it down.

I finally ate more than I have been since Monday tonight, so I felt somewhat like poking in my code to hopefully find/fix it. :)
Tom
« Last Edit: March 26, 2015, 05:12 AM by tomos »