none
DISM import DefaultAppAssociations doesnt work anymore since build 1511 RRS feed

  • Question

  • As Title says, i have problem since new 1511 build i cant set default apps in my sysprep images.

    Dism.exe /online /Export-DefaultAppAssociations:c:\AppAssoc.xml

    Than later before sysprep

    Dism.exe /online /Import-DefaultAppAssociations:c:\AppAssoc.xml

    This worked since windwos 7, and it also worked on previous windows 10 build (tho not perfect, some apps where not changed).

    Now it doesnt work at all, not single app gets set.

    Tuesday, November 24, 2015 1:27 PM

All replies

  • Hi,

    Thanks for sharing, it took some time to do the same test. I tested on 10240 and 10586 machines and seems like you are right, when we import xml files and all states that this command runs successfully, however, if you export them to check, you will find that there is no change on 10586. So seems like this DISM doesn’t work under 10586. This issue will be raised from our side. In the other hand, you could also report it by using built-in feedback tools. We really appreciate your time and efforts.

    Regards,

    D. Wu


    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Monday, November 30, 2015 1:48 AM
    Moderator
  • Hi,

    Thanks for sharing, it took some time to do the same test. I tested on 10240 and 10586 machines and seems like you are right, when we import xml files and all states that this command runs successfully, however, if you export them to check, you will find that there is no change on 10586. So seems like this DISM doesn’t work under 10586. This issue will be raised from our side. In the other hand, you could also report it by using built-in feedback tools. We really appreciate your time and efforts.

    Regards,

    D. Wu


    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    This has been reported in the Feedback, but I haven't heard anything else about it.  We cannot deploy Windows 10 in our organization until this is fully fixed.  We need to be able to set default file and protocol (HTTP, FTP, etc.) associations for our users without the users having to choose them.

    Is this problem being looked into?  Can we assume that it will be fixed soon?

    Thursday, December 31, 2015 12:04 AM
  • Hi,

    This issue has been tested and reported from our side on 30.Nov. But unfortunately we don’t have much information about schedule. please keep your system up to date and check. We will keep this thread open until it get fixed.

    Regards,

    D. Wu


    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Thursday, December 31, 2015 7:46 AM
    Moderator
  • Hello does anyone know if Microsoft is working on this problem? I may not use Win10 for my users until solution.
    Tuesday, January 5, 2016 2:08 AM
  • Issue still not fixed , i cant belive it takes MS so much time to fix it, im loosing about 10-15 minutes PER PC every time as i need to manually set app associations for various protocols, now multiple those 15 minutes with hundreds of computers..

    Before i could export contents of HKCU SOFTWARE Microsoft CurrentVersion Explorer FileExtb

    Than i added one time run script for each new user to import this keys, but that also stoped working as  i get error that i cant import due keys being opened or permissions, and theres no way around it..

    Friday, January 29, 2016 7:57 AM
  • Our team has received official response from Microsoft Premier Support that this a bug in 1511. I have tested with build 14271, and file associations are still broken. 

    I am getting the new build, 14279 downloaded right now.  Will test in my lab and update. 



    • Edited by Tim Knapp Wednesday, March 9, 2016 3:18 PM Out dated signature
    Wednesday, March 9, 2016 3:15 PM
    • Proposed as answer by StephenEL1 Friday, March 11, 2016 11:08 PM
    • Edited by StephenEL1 Friday, March 11, 2016 11:09 PM edit url
    Friday, March 11, 2016 11:08 PM
  • We used GPO as a work-around for now... https://technet.microsoft.com/en-us/library/mt269907.aspx?f=255&MSPPError=-2147217396

    Stephen


    This is counter intuitive.  We as deployment professionals ultimately want to empower the users, and deliver the requirements our customers' set forth.  Using a GPO does not allow the user to customize Windows 10 default applications.   This bug doesn't allow us to develop a standard to educate the user with, and allow them at the same time to learn the OS and customize as they want it.  

    TK. @ITOpsReborn.   


    Tim Knapp; Ascent Solutions LLC, http://itopsreborn.com

    • Proposed as answer by WWU-Babs Wednesday, August 10, 2016 8:12 PM
    • Unproposed as answer by WWU-Babs Wednesday, August 10, 2016 8:12 PM
    Saturday, March 12, 2016 1:10 AM
  • We used GPO as a work-around for now... https://technet.microsoft.com/en-us/library/mt269907.aspx?f=255&MSPPError=-2147217396


    Stephen


    This is counter intuitive.  We as deployment professionals ultimately want to empower the users, and deliver the requirements our customers' set forth.  Using a GPO does not allow the user to customize Windows 10 default applications.   This bug doesn't allow us to develop a standard to educate the user with, and allow them at the same time to learn the OS and customize as they want it.  

    TK. @ITOpsReborn.   


    Tim Knapp; Ascent Solutions LLC, http://itopsreborn.com

    Actually after reviewing the Group Policy setting, the description states:

    If the policy is enabled, disabled, or not configured, users will still be able to override default file type and protocol associations.

    This would appear to be a workable solution, export the default assoications using DISM and apply these associations using group policy.

    This falls in line with other behaviors in Windows 10 with the start menu layout for example.


    Kriss Milne | MCSE | https://blog.krissmilne.tech | Twitter | LinkedIn

    Friday, June 10, 2016 7:02 AM
  • We used GPO as a work-around for now... 


    Stephen


    This is counter intuitive.  We as deployment professionals ultimately want to empower the users, and deliver the requirements our customers' set forth.  Using a GPO does not allow the user to customize Windows 10 default applications.   This bug doesn't allow us to develop a standard to educate the user with, and allow them at the same time to learn the OS and customize as they want it.  

    TK. @ITOpsReborn.   


    Tim Knapp; Ascent Solutions LLC, http://itopsreborn.com

    Actually after reviewing the Group Policy setting, the description states:

    If the policy is enabled, disabled, or not configured, users will still be able to override default file type and protocol associations.

    This would appear to be a workable solution, export the default assoications using DISM and apply these associations using group policy.

    This falls in line with other behaviors in Windows 10 with the start menu layout for example.


    Kriss Milne | 

    The issue with the GPO is it requires the user to be part of a domain. This should and needs to be able to work regardless of domain participation.

    Thursday, June 30, 2016 6:40 PM
  • The user can change the default associations when the GPO is enabled but the associations defined in the xml are applied everytime the user logs on. 
    Wednesday, July 20, 2016 10:19 AM
  • Through intense link-following coupled with trial and error I found a solution that works (at least for us). We use Sysprep to build and capture and then WinPE and cloning tools to deploy. It appears you can inject the XML file into the offline image post-capture. Why the import works offline but not elsewhere is beyond me. This is not a solution for live stations, but might solve the issue for new installs.

    Step 1

    Once you have your completed image. Make a copy of it and move it to a new folder on your local PC. I put mine in a folder called Image.

     

    Step 2

    Take your Application Associations XML file and copy it to the same folder location as above. Instructions on exporting an XML of your file associations can be found online here.

     

    Step 3

    Open an administrator Command Prompt and run the following command. This mounts the offline image so we can modify it.

     

    DISM /Mount-Image /ImageFile:C:\Image\[Image-Name].wim /index:1 /MountDir:C:\MOUNTS

     

    Step 4

    Once the image successfully mounts run the following command to import the XML into the image.

     

    DISM /Image:C:\MOUNTS /Import-DefaultAppAssociations:C:\Image\AppAssoc.xml

     

    Step 5

    Run the following command to check to insure your defaults are as they should be before you commit the changes.

     

    Dism.exe /Image:C:\MOUNTS /Get-DefaultAppAssociations

     

    Step 6

    Commit the changes and unmount the image with the following command.

     

    Dism /Unmount-Image /MountDir:C:\MOUNTS /Commit




    • Proposed as answer by WWU-Babs Wednesday, August 10, 2016 8:22 PM
    • Edited by WWU-Babs Wednesday, August 10, 2016 8:23 PM
    Wednesday, August 10, 2016 8:19 PM
  • You do not to this step if you running a bare metal install or a USMT in-place upgrade. The problem is using the upgrade installation for Windows 10.

    I am currently testing OOBE 1607 media to see if Microsoft has fixed the issue. 


    Tim Knapp; Ascent Solutions LLC, http://itopsreborn.com

    Wednesday, August 10, 2016 9:03 PM
  • OOBE 1607 does not work either. Very frustrating.

    Did not work using Group Policy either.
    • Edited by ssronce Friday, August 12, 2016 5:06 PM
    Friday, August 12, 2016 5:05 PM
  • How many default associations are you guys changing that this is a showstopper?! I haven't even considered changing anything but perhaps PDF and even then, considered only...

    Jack

    Friday, August 12, 2016 5:16 PM
  • yep its annoying doesn't work via gpo or dsim with 1607. All I want to do is change pdf to Acrobat reader DC!

    Actually there are quite a few REALLY annoying changes with 1607, mainly to do with crippling win10 PRO and making a lot of changes that could be done via GPO now ONLY available if using Enterprise SKU's, changing lock screen removing apps etc. grrrrrrrrrrrrr

    • Edited by fancyabrew Tuesday, August 23, 2016 3:44 PM
    Tuesday, August 23, 2016 3:43 PM
  • same here. trying to set Acrobat DC Standard for pdfs since we can't have acrobat dc in our image; sysprep kills the offline exception licensing crap that adobe now does w/DC so i am installing acrobat dc via setupcomplete.cmd and in turn need to set default pdf viewer away from effing EDGE. omg, i effing HATE EDGE so much....

    we are on 1607 builds and yup, DISM /Online /Import-DefaultAppAssocations = nothing.. how does microsoft eff up so bad so many times in the last 3 years? do the developers even listen to what us administrators want or know what we do in the real world? eff off about MDT and SCCM; we do thick images and will keep on doing them since we need to set default app settings and sccm and mdt just can't do that or is a pain in ass and also... umm.. licensing costs??? yea, i have a nearly complete non SCCM deployment scheme for win10 just using WDS 2012, MDT2016 for ONLY driver packages and VMs to create hardware agnostics images.  My solution uses custom boot wim's which i've built from scratch.  yea.... win10 has not been a fun os to try to get ready to deploy... dare i say up to Vista and Win8 standards....


    Paid IT Geek; mobile/desktops/deployments

    Tuesday, October 25, 2016 7:50 PM
  • support ticket w/Enterprise Support put in today. i will post any updates i get that are worth while. i have very low expectations i'll get a proper fix/workaround.

    Paid IT Geek; mobile/desktops/deployments

    Tuesday, October 25, 2016 8:16 PM
  • Any updates on this problem? I'm encountering the same problem! Really frustrating! It's a dealbreaker for our Windows 10 deployments! :(
    Wednesday, October 26, 2016 2:46 PM
  • Tested it at the Moment with Version 1607 Build 14393.187.

    Still not working.

    I hope Microsoft will really solve this. It's not funny.

    Monday, November 21, 2016 2:32 PM
  • I've tested it with OS build 1607  14393.447 and it doesn't work either. I tested by exporting my current defaults to a file on my C:, then changed the default web browser and then imported my local, exported file and nothing was changed. Am I doing something wrong or is it still broke?

    C:\Windows\system32>Dism /Online /Export-DefaultAppAssociations:c:\defaultassociations.xml

    Deployment Image Servicing and Management tool
    Version: 10.0.14393.0

    Image Version: 10.0.14393.0

    The operation completed successfully.

    C:\Windows\system32>Dism /Online /import-DefaultAppAssociations:c:\defaultassociations.xml

    Deployment Image Servicing and Management tool
    Version: 10.0.14393.0

    Image Version: 10.0.14393.0

    The operation completed successfully.

    I also tried the group policy method mentioned earlier and had not success. 



    Tuesday, November 22, 2016 1:17 PM
  • Group Policy works for me - make sure that the computer account has read access to the directory where the xml file is.

    But that's not really a solution because as it's been mentioned, the group policy overrides user defined settings after every logon. So if you have a setup where 90% of users should open JPGs with XnView, but 10% would like to open them with Photoshop, you're screwed.

    Tuesday, November 29, 2016 12:57 PM
  • I am having issues with this as well a year later. I really wish MS would fix this, we shouldn't have to use workarounds a year after the original problem was reported.
    Tuesday, November 29, 2016 2:04 PM
  • I tried this today with 1607 and it worked. It only works with new profiles, so trying with an account that has already logged on doesn't work. I ran the command line in MDT at the end of the TS and finished with a reboot. The Administrator account does not have the new settings, but a new account does. I didn't try it with domain accounts but the result should be the same.

    Command line: Dism.exe /online /Import-DefaultAppAssociations:c:\AppAssoc.xml

    Tuesday, November 29, 2016 3:00 PM
  • I just tried it again, unsuccessfully.

    Set up a clean Windows 10 1607 PC, installed Acrobat Reader. Then logged on an administrator account, and did a "dism /online /import-defaultappassociations:adobe.xml" with the following file

    <?xml version="1.0" encoding="UTF-8"?>
    <DefaultAssociations>
      <Association Identifier=".pdf" ProgId="AcroExch.Document.DC" ApplicationName="Adobe Acrobat Reader DC" />
    </DefaultAssociations>

    If I then have a look with regedit in "HKLM\Software\Classes\.pdf" the association has changed to Acrobat.

    But if I then log off the admin account, log on a regular user account that hadn't existed on that PC yet, PDFs defaulted to Edge. Even if I delete the "HKCU\Software\Classes\.pdf" key, which should make HKCR to merge to the HKLM hive, the PDFs still open with Edge.

    In my opinion Windows is taking some settings either from c:\users\default or an even more arcane different location instead of from HKLM like it's supposed to.

    This stuff used to work in 1504, it's only been broken since 1511.

    Wednesday, November 30, 2016 3:52 PM
  • Having the same issue since started a new image yesterday. I believe that the import command just copies the XML to "C:\Windows\System32\OEMDefaultAssociations.xml", but this is doing NOTHING for me.
    Wednesday, November 30, 2016 4:10 PM
  • I spent more time on this yesterday and FINALLY figured out how to get this working...

    dism.exe /Online /Import-DefaultAppAssociations:<filepath> literally just copies the file you specify to %WINDIR%\System32\OEMDefaultAssociations.xml.

    To get this working, I did the following:

    -Log in as some test/admin account

    -Export the defaults (don't change anything yet) to AppAssoc_Backup.xml
    dism.exe /Online /Export-DefaultAppAssociations:AppAssoc_Backup.xml

    -Make your file association changes. In my case this was changing the browser to IE and making Adobe Reader the default for PDFs

    -Export the new association config to AppAssoc_Modified.xml
    dism.exe /Online /Export-DefaultAppAssociations:AppAssoc_Modified.xml

    -Open AppAssoc_Modified.xml and remove anything not related to what you want to change. Then for each line item you will add ApplyOnUpgrade="true" OverwriteIfProgIdIs="OrigProgID" after "ApplicationName" where OrigProgID is the original ProgID for that item in the AppAssoc_Backup.xml export
    This is my file:
    <?xml version="1.0" encoding="UTF-8"?>
    <DefaultAssociations>
      <Association Identifier=".htm" ProgId="htmlfile" ApplicationName="Internet Explorer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9" />
      <Association Identifier=".html" ProgId="htmlfile" ApplicationName="Internet Explorer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9" />
      <Association Identifier=".url" ProgId="IE.AssocFile.URL" ApplicationName="Internet Browser" />
      <Association Identifier=".website" ProgId="IE.AssocFile.WEBSITE" ApplicationName="Internet Explorer" />
      <Association Identifier="http" ProgId="IE.HTTP" ApplicationName="Internet Explorer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXq0fevzme2pys62n3e0fbqa7peapykr8v" />
      <Association Identifier="https" ProgId="IE.HTTPS" ApplicationName="Internet Explorer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX90nv6nhay5n6a98fnetv7tpk64pp35es" />
      <Association Identifier=".pdf" ProgId="AcroExch.Document.DC" ApplicationName="Adobe Acrobat Reader DC" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723" />
    </DefaultAssociations>

    -Copy this new file to %WINDIR%\System32\OEMDefaultAssociations.xml (this is what dism.exe /Online /Import-DefaultAppAssociations:<filepath> does). If you are doing this for an offline image then you can just inject it or use dism to import/inject it.

    Now any new profile will receive the defaults you specified here. I tried all combinations and the only thing that worked was adding the ApplyOnUpgrade and OverwriteIfProgIdIs options to each line. .url and .website were never specifically pointing to Edge, so I left them in there, but didn't have to add the two options. I could not find any documentation on this unfortunately, but I tested it and it is working perfectly.



    • Proposed as answer by mdepalmasop Thursday, December 1, 2016 2:02 PM
    • Edited by mdepalmasop Thursday, December 1, 2016 3:27 PM
    Thursday, December 1, 2016 2:01 PM
  • You are my hero mdepalmasop!

    I almost went mad with this sh*t for Windows 10 deployment, spend so much time searching for a solution and there you are, thank you so much!

    I just had a little difference, the XML file must contains the values of the old OEMDefaultAssociations.xml or there are annoying notifications about file association reset

    Here my xml file, my company needs is :

    - Internet Explorer as default web browser

    - VLC as default media player

    - Adobe Reader as PDF reader

    - Windows 10 Enterprise 1607
    <?xml version="1.0" encoding="UTF-8"?>
    <DefaultAssociations>
      <Association Identifier=".3g2" ProgId="VLC.3g2" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.3G2" />
      <Association Identifier=".3gp" ProgId="VLC.3gp" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.3GP" />
      <Association Identifier=".3gp2" ProgId="VLC.3gp2" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.3G2" />
      <Association Identifier=".3gpp" ProgId="VLC.3gpp" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.3GP" />
      <Association Identifier=".aac" ProgId="VLC.aac" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.ADTS" />
      <Association Identifier=".ac3" ProgId="VLC.ac3" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".acrobatsecuritysettings" ProgId="AcroExch.acrobatsecuritysettings" ApplicationName="Adobe Acrobat Reader DC" ApplyOnUpgrade="true" />
      <Association Identifier=".adt" ProgId="VLC.adt" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.ADTS" />
      <Association Identifier=".adts" ProgId="VLC.adts" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.ADTS" />
      <Association Identifier=".aif" ProgId="VLC.aif" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.AIFF" />
      <Association Identifier=".aifc" ProgId="VLC.aifc" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.AIFF" />
      <Association Identifier=".aiff" ProgId="VLC.aiff" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.AIFF" />
      <Association Identifier=".arw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".asf" ProgId="VLC.asf" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.ASF" />
      <Association Identifier=".asx" ProgId="VLC.asx" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.ASX" />
      <Association Identifier=".au" ProgId="VLC.au" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.AU" />
      <Association Identifier=".avi" ProgId="VLC.avi" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.AVI" />
      <Association Identifier=".bmp" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;Paint.Picture" />
      <Association Identifier=".bik" ProgId="VLC.bik" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".cda" ProgId="VLC.cda" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.CDA" />
      <Association Identifier=".cr2" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".crw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".dib" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;Paint.Picture" />
      <Association Identifier=".divx" ProgId="VLC.divx" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".dts" ProgId="VLC.dts" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".dv" ProgId="VLC.dv" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".erf" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".f4v" ProgId="VLC.f4v" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".fdf" ProgId="AcroExch.FDFDoc" ApplicationName="Adobe Acrobat Reader DC" ApplyOnUpgrade="true" />
      <Association Identifier=".flac" ProgId="VLC.flac" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".flv" ProgId="VLC.flv" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".gif" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;giffile" />
      <Association Identifier=".gvi" ProgId="VLC.gvi" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".gxf" ProgId="VLC.gxf" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".htm" ProgId="htmlfile" ApplicationName="Internet Explorer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX6k1pws1pa7jjhchyzw9jce3e6hg6vn8d" />
      <Association Identifier=".html" ProgId="htmlfile" ApplicationName="Internet Explorer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX6k1pws1pa7jjhchyzw9jce3e6hg6vn8d" />
      <Association Identifier=".jfif" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;pjpegfile" />
      <Association Identifier=".jpe" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;jpegfile" />
      <Association Identifier=".jpeg" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" />
      <Association Identifier=".jpg" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;jpegfile" />
      <Association Identifier=".jxr" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;wdpfile" />
      <Association Identifier=".kdc" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".m1v" ProgId="VLC.m1v" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.MPEG" />
      <Association Identifier=".m2t" ProgId="VLC.m2t" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".m2ts" ProgId="VLC.m2ts" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".m2v" ProgId="VLC.m2v" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".m3u" ProgId="VLC.m3u" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".m4a" ProgId="VLC.m4a" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.M4A" />
      <Association Identifier=".m4p" ProgId="VLC.m4p" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".m4v" ProgId="VLC.m4v" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.MP4" />
      <Association Identifier=".mid" ProgId="VLC.mid" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.MIDI" />
      <Association Identifier=".midi" ProgId="VLC.midi" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.MIDI" />
      <Association Identifier=".mka" ProgId="VLC.mka" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.MKA" />
      <Association Identifier=".mkv" ProgId="VLC.mkv" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".mlp" ProgId="VLC.mlp" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".mod" ProgId="VLC.mod" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".mov" ProgId="VLC.mov" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.MOV" />
      <Association Identifier=".mrw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".mp1" ProgId="VLC.mp1" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".MP2" ProgId="VLC.mp2" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".mp2v" ProgId="VLC.mp2v" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".mp3" ProgId="VLC.mp3" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.MP3" />
      <Association Identifier=".mp4" ProgId="VLC.mp4" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.MP4" />
      <Association Identifier=".mp4v" ProgId="VLC.mp4v" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.MP4" />
      <Association Identifier=".mpa" ProgId="VLC.mpa" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" />
      <Association Identifier=".mpc" ProgId="VLC.mpc" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".MPE" ProgId="VLC.mpe" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" />
      <Association Identifier=".mpeg" ProgId="VLC.mpeg" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" />
      <Association Identifier=".mpeg1" ProgId="VLC.mpeg1" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".mpeg2" ProgId="VLC.mpeg2" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".mpeg4" ProgId="VLC.mpeg4" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".mpg" ProgId="VLC.mpg" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" />
      <Association Identifier=".mpga" ProgId="VLC.mpga" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".mpv2" ProgId="VLC.mpv2" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".mts" ProgId="VLC.mts" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.mts" />
      <Association Identifier=".mtv" ProgId="VLC.mtv" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".nef" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".nrw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".oga" ProgId="VLC.oga" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".ogg" ProgId="VLC.ogg" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".ogm" ProgId="VLC.ogm" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".ogv" ProgId="VLC.ogv" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".ogx" ProgId="VLC.ogx" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".orf" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".oxps" ProgId="Windows.XPSReachViewer" ApplicationName="XPS Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j" />
      <Association Identifier=".pdf" ProgId="AcroExch.Document.DC" ApplicationName="Adobe Acrobat Reader DC" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j;AppXk660crfh0gw7gd9swc1nws708mn7qjr1" />
      <Association Identifier=".pdfxml" ProgId="AcroExch.pdfxml" ApplicationName="Adobe Acrobat Reader DC" ApplyOnUpgrade="true" />
      <Association Identifier=".pdx" ProgId="PDXFileType" ApplicationName="Adobe Acrobat Reader DC" ApplyOnUpgrade="true" />
      <Association Identifier=".png" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".pef" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".raf" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".raw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".rw2" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".rwl" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".rmi" ProgId="VLC.rmi" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.MIDI" />
      <Association Identifier=".tif" ProgId="PhotoViewer.FileAssoc.Tiff" ApplicationName="Windows Photo Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j;AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;TIFImage.Document" />
      <Association Identifier=".tiff" ProgId="PhotoViewer.FileAssoc.Tiff" ApplicationName="Windows Photo Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j;AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;TIFImage.Document" />
      <Association Identifier=".sr2" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".srw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".snd" ProgId="VLC.snd" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.AU" />
      <Association Identifier=".TS" ProgId="VLC.ts" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.TS" />
      <Association Identifier=".TTS" ProgId="VLC.tts" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.TTS" />
      <Association Identifier=".txt" ProgId="txtfile" ApplicationName="Notepad" />
      <Association Identifier=".url" ProgId="IE.AssocFile.URL" ApplicationName="Internet Explorer" />
      <Association Identifier=".vlc" ProgId="VLC.vlc" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".vlt" ProgId="VLC.vlt" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".vob" ProgId="VLC.vob" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".voc" ProgId="VLC.voc" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".vqf" ProgId="VLC.vqf" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".vro" ProgId="VLC.vro" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".w64" ProgId="VLC.w64" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".wav" ProgId="VLC.wav" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.WAV" />
      <Association Identifier=".wdp" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />
      <Association Identifier=".webm" ProgId="VLC.webm" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".website" ProgId="IE.AssocFile.WEBSITE" ApplicationName="Internet Explorer" />
      <Association Identifier=".wm" ProgId="VLC.wm" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.ASF" />
      <Association Identifier=".wma" ProgId="VLC.wma" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.WMA" />
      <Association Identifier=".wmv" ProgId="VLC.wmv" ApplicationName="VLC media player" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.WMV" />
      <Association Identifier=".wvx" ProgId="VLC.wvx" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".WPL" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.WPL" />
      <Association Identifier=".xdp" ProgId="AcroExch.XDPDoc" ApplicationName="Adobe Acrobat Reader DC" ApplyOnUpgrade="true" />
      <Association Identifier=".xfdf" ProgId="AcroExch.XFDFDoc" ApplicationName="Adobe Acrobat Reader DC" ApplyOnUpgrade="true" />
      <Association Identifier=".xps" ProgId="Windows.XPSReachViewer" ApplicationName="XPS Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j" />
      <Association Identifier=".xvid" ProgId="VLC.xvid" ApplicationName="VLC media player" ApplyOnUpgrade="true" />
      <Association Identifier=".zpl" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" />
      <Association Identifier="acrobat" ProgId="acrobat" ApplicationName="Adobe Acrobat Reader DC" ApplyOnUpgrade="true" />
      <Association Identifier="http" ProgId="IE.HTTP" ApplicationName="Internet Explorer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXehk712w0hx4w5b8k25kg808a9h84jamg"/>
      <Association Identifier="https" ProgId="IE.HTTPS" ApplicationName="Internet Explorer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXz8ws88f5y0y5nyrw1b3pj7xtm779tj2t"/>
      <Association Identifier="mswindowsmusic" ProgId="AppXtggqqtcfspt6ks3fjzyfppwc05yxwtwy" ApplicationName="Music" ApplyOnUpgrade="true" />
      <Association Identifier="mswindowsvideo" ProgId="AppX6w6n4f8xch1s3vzwf3af6bfe88qhxbza" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" />
    </DefaultAssociations>

    I tried to add 7-Zip but it's not working :(
    Friday, December 16, 2016 12:03 PM
  • As mentioned, doing the DISM online import overwrites the OEMDefaultAssociations.xml file so you want to make sure you include all the extensions not just the ones you want to change otherwise you will get a lot of file association notifications saying the default application has changed.  Fortunately, Windows 10 is smart enough to fix them and set them back to default.  Unfortunately, doing a DISM export and import doesn't include ApplyOnUpgrade or OverwriteIfProgIdIs sections.  Manually adding those back is tedious and has lots of room for error.  What I've been doing to be on the safe side is to simply change the one line I needed changed in the existing OEMDefaultAssociations.xml file using PowerShell.  I created a simple script which I packaged in SCCM and then deploy during OSD so even the built in administrator account has the correct associations.  I have a custom branding step after Set Status 4 where I set certain things like Start Menu/Task Bar layout and file assocations, etc.. The script is below.  For now I just use it to set Reader DC (Classic) as the default but you can modify it to change any associations as needed.  Hope this helps someone.

    $filepath ="$env:SystemDrive\Windows\System32"
    $filename = "\oemdefaultassociations.xml"
    $filefullpath = $filepath + $filename
    $findstring = '<Association Identifier=".pdf" ProgId="AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j;AppXk660crfh0gw7gd9swc1nws708mn7qjr1" />'
    
    #Replace ProgID= with the correct ProgID for the application you have installed.
    $replacestring = '<Association Identifier=".pdf" ProgId="AcroExch.Document.2015" ApplicationName="Adobe Acrobat Reader DC" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723" />'
    
    (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath

    • Proposed as answer by skt-tec Monday, September 25, 2017 1:39 PM
    Friday, December 16, 2016 4:09 PM
  • This workarounds dont work for me, i even tried taking above script from user above because i was thinking i made error but associations still reset on fresh install..
    Thursday, January 19, 2017 8:06 AM
  • That solution worked just fine for me. The complete guide to do this is (as an example let's take PDFs):

    1. Sign on with a user account on a newly imaged PC, right click on a PDF, open with, choose another app, Adobe Reader, always use this app

    2. Use "dism /online /export-defaultappassociations" to export that users associations to a file somewhere

    3. Copy the line that includes Identifier="p.pdf"

    4. Insert it into c:\windows\system32\OEMDefaultAssociations.xml (preferably after the original pdf line)

    5. Insert the two additional attributes into the newly copied xml element ApplyOnUpgrade="true" 

    6. And OverwriteIfProgIdIs="AppX1234567" where the progid is copied from the ProgId attribute of element that you are about to replace

    7. Delete the original xml element that mentions ".pdf"

    When I do this, any newly logged on user accounts on that PC then open PDFs by default with Adobe Reader.

    • Proposed as answer by IT-Lange Monday, April 17, 2017 7:07 PM
    Tuesday, January 24, 2017 3:20 PM
  • This is pretty ridiculous that after over a year there is still no official fix...??? Has this workaround been tested in 1511 and 1607? Has anyone had a chance to see if tech preview 1701 still has this issue?
    • Edited by JackalAR Wednesday, February 1, 2017 6:17 PM
    Wednesday, February 1, 2017 6:16 PM
  • I also need to use this method to set Adobe Reader as the default PDF reader.
    It does not work with import-export (on W8.1).
    Also, I ask myself a question:

    A Dism /online /Get-DefaultAppAssociations gives me in the xml file this:

    ApplicationName = "Microsoft Edge" ApplyOnUpgrade = "true" OverwriteIfProgIdIs = "AppXk660crfh0gw7gd9swc1nws708mn7qjr1" />

    However, with a Dism.exe /Online /Export-DefaultAppAssociations:C:\AppAssoc1.xml

    I have a much less explicit file:

    <Association Identifier = ".pdf" ProgId = "AcroExch.Document.DC" ApplicationName = "Adobe Acrobat Reader DC" />

    He forgets the values

    ApplyOnUpgrade = "true" and OverwriteIfProgIdIs =

    How do you get those values? I think that is my problem

    • Edited by Redreum Friday, February 3, 2017 11:12 AM
    Friday, February 3, 2017 11:11 AM
  • 451 days since this post was created and we still don't have an actual fix. Is this ever going to be updated?
    • Proposed as answer by JackalAR Friday, February 17, 2017 6:21 PM
    Friday, February 17, 2017 5:45 PM
  • Hello, 

    Where did you find out about the OverwriteIfProgIdIs option?

    Is there any official documentation available?

    This option worked to solve a similar symptom, but I'd like to know how and why, especially if there are more options available in the schema.


    Wednesday, March 29, 2017 7:30 PM
  • I found a real workaround for this.  I have had to do a ton of crazy stuff with asynchronous commands in my unattend.  My steps/logic and results (aka WORKING!!)

    1. deploy my image with all apps but file associations not properly set.  

    2. after deployment, login and set all file assocations with all of the main apps installed. reboot

    3. open up an elevated command prompt and then use this dism command to export the currently configured file assocations.  

    Command:

    Dism.exe /Online /Export-DefaultAppAssociations:C:\ProgramData\JimmyTools\Win10-utils\NewappAssoc.xml

    4. i have a folder in programdata on my main thick image to house any local scripts/xml files and the likes that are needed even more w/win10 deployments.

    5. In my unattend file for the iamges; i have one synchronous command that will call a postinstall.cmd script that will literally fix most issues i've ran into with win10 deployments and the inability to set default settings/startmenu layouts/taskbar layouts while still ALLOWING USERS TO CHANGE THESE. our defaults are more recommended settings; we use GPO for things we DON'T want users ever changing. 

    my unattend synchronous line:

                <FirstLogonCommands>
                    <SynchronousCommand wcm:action="add">
                        <Order>1</Order>
                        <CommandLine>"C:\programdata\jimmytools\win10-utils\postinstall-laptop.cmd"</CommandLine>
                    </SynchronousCommand>


    In this postinstall-laptop.cmd; i have a line that will set the default file assocations.  I do this by calling:

    start /wait C:\windows\system32\Dism.exe /Online /Import-DefaultAppAssociations:C:\ProgramData\JimmyTools\Win10-utils\appAssoc.xml

    My unattend file also uses the copyprofile = yes so in turn all users will get this set as their default but since we do this in the unattend file we don't make this managed but more just set as the default that the users can later change.

    I handle the startmenu/taskbar layout in a very similar manner in that i will arrange my start menu and also the taskbar icons as i want them and then run a dism command to export the layout to an xml file.  I then setup the local gpedit.msc to use the startmenu xml file.

    After i deploy the image to a machine; i then go back into the registry and just change the start menu layout policy to be 'not configured' and once you restart explorer; the start menu and taskbar icons are fully editable by users while we still are able to put the basic apps icons there for them to use.

    HKEY_LOCAL_MACHINE/SOFTWARE/Policies/Microsoft/Windows/Explorer/LockedStartLayout = 0

    Yea, i've hacked around win10 WAY TOO MUCH.  I can give more details on this if anyone is interested. i really should write a huge blog post on how to make a thick win10 hardware agnostic image with application defaults, copyprofile and customized startmenu/taskbar layouts. 


    Paid IT Geek; mobile/desktops/deployments



    • Edited by JimmyTheS Friday, April 14, 2017 10:04 PM fixed the fix, hehe
    Friday, April 14, 2017 10:01 PM
  • Just tested in 1607. Working absolutely fine.
    Dism.exe /online /Import-DefaultAppAssociations:c:\AppAssoc.xml


    As others have noted, this only changes app associations for new users logging into the system for the first time, so remember that in your testing.

    Tuesday, May 9, 2017 1:50 PM
  • Tested our new 1607 image yesterday and it seems to be working fine as well.
    Thursday, May 11, 2017 12:31 PM
  • They seem to have broken this in 1703 again. I have tried all three methods quoted in this thread and the PDF extension still sticks with Edge.
    Wednesday, May 17, 2017 3:38 PM
  • They seem to have broken this in 1703 again. I have tried all three methods quoted in this thread and the PDF extension still sticks with Edge.

    Yip doesn't work in 1703... anyone found a fix or a work around?

    Monday, June 5, 2017 12:23 PM
  • Can confirm that this is broken with 1703. We do a lot of testing in our LAB..no way..at this time.

    Tuesday, August 1, 2017 3:21 PM
  • 9 days later, Is there a solution to this?
    Friday, August 11, 2017 6:56 AM
  • I managed to associate PDFs to the latest Acrobat Reader DC on 1703 but for NEW USERS only. I haven't seen a reset yet. I tried everything for existing users, but to not avail. Anyway, here's my recipe:

    1. Install Acrobat Reader DC
    2. Open Notepad as admin
    3. Open C:\Windows\System32\OEMDefaultAssociations.xml
    4. Change the line where it says Association Identifier=".pdf" to:

    <Association Identifier=".pdf" ProgId="AcroExch.Document" ApplicationName="Adobe Acrobat Reader DC" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723" />


    5. Run the following batch file:

    reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"
    reg.exe add "HKU\DefaultUser\Software\Adobe\Acrobat Reader\DC\AVAlert\cCheckbox" /v iAppDoNotTakePDFOwnershipAtLaunch /t REG_DWORD /d 1 /f
    reg.exe add "HKU\DefaultUser\Software\Adobe\Acrobat Reader\DC\AVAlert\cCheckbox" /v iAppDoNotTakePDFOwnershipAtLaunchWin10 /t REG_DWORD /d 1 /f
    reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ApplicationAssociationToasts" /v AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723_.pdf /t REG_DWORD /d 0 /f
    reg.exe unload "HKU\DefaultUser"
    pause


    There you go, that should do it, for NEW USERS only.

    DISM and the GPO option are crap, do NOT use them. I created a PowerShell function to merge stuff into OEMDefaultAssociations.xml without overwriting the whole file:

    # Merge-AssocXML.ps1
    [CmdletBinding()]
    Param (
    	[Parameter(Mandatory=$true)]
    	[string]$From,
    	[Parameter(Mandatory=$false)]
    	[string]$To = "$env:WINDIR\system32\OEMDefaultAssociations.xml"
    )
    
    Function Merge-AssocXML ([string]$From, [string]$To)
    {
    	$xmlOld = $null
    
    	Try {
    		$xmlOld = [xml](Get-Content $To -ErrorAction Stop)
    	} Catch {
    		$xmlOld = [xml]'<?xml version="1.0" encoding="UTF-8"?><DefaultAssociations></DefaultAssociations>'
    	}
    
    	$xmlNew = [xml](Get-Content $From -ErrorAction Stop)
    
    	ForEach ($newAssoc in $xmlNew.SelectNodes('//Association'))
    	{
    		([System.Xml.XmlElement]$newAssoc).SetAttribute("ApplyOnUpgrade","true")
    		$ident = $newAssoc.Attributes["Identifier"].Value
    		$identExists = $false
    
    		ForEach ($oldAssoc in $xmlOld.SelectNodes("//Association[@Identifier=""$ident""]"))
    		{
    			$identExists = $true
    			$oldAssoc.RemoveAll() # remove existing properties
    
    			ForEach ($newAttrib in $newAssoc.Attributes) # copy new properties
    			{
    				([System.Xml.XmlElement]$oldAssoc).SetAttribute($newAttrib.Name,$newAttrib.Value)
    			}
    		}
    
    		if (-not $identExists) # add association directly
    		{
    			$xmlOld.SelectSingleNode('/DefaultAssociations').AppendChild($xmlOld.ImportNode($newAssoc,$true)) | Out-Null
    		}
    	}
    
    	$toPath = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($To);
    	$date = (Get-Date).ToString("yyyy-MM-dd_HH-mm-ss")
    
    	Copy-Item $toPath ($toPath.Replace(".xml","_$date.xml") + ".bak")
    
    	$xmlOld.Save($toPath)
    }
    
    if (([version](Get-WmiObject Win32_OperatingSystem).Version) -ge ([version]'10.0')) # Win 10+
    {
    	Merge-AssocXML $From $To
    }


    <!-- AssocReaderDC.xml -->
    <?xml version="1.0" encoding="UTF-8"?>
    <DefaultAssociations>
      <Association Identifier=".pdf" ProgId="AcroExch.Document" ApplicationName="Adobe Acrobat Reader DC" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723" />
    </DefaultAssociations>
    <!-- AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723 = Microsoft Edge -->
    <!-- Do NOT use DISM import, it's way too slow, and all it does is overwrite C:\Windows\System32\OEMDefaultAssociations.xml -->


    REM AssocReaderDC.bat
    powershell.exe -ExecutionPolicy Bypass -File .\Merge-AssocXML.ps1 -From .\AssocReaderDC.xml
    reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"
    reg.exe add "HKU\DefaultUser\Software\Adobe\Acrobat Reader\DC\AVAlert\cCheckbox" /v iAppDoNotTakePDFOwnershipAtLaunch /t REG_DWORD /d 1 /f
    reg.exe add "HKU\DefaultUser\Software\Adobe\Acrobat Reader\DC\AVAlert\cCheckbox" /v iAppDoNotTakePDFOwnershipAtLaunchWin10 /t REG_DWORD /d 1 /f
    reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ApplicationAssociationToasts" /v AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723_.pdf /t REG_DWORD /d 0 /f
    reg.exe unload "HKU\DefaultUser"
    pause


    I just wanna say that the Windows 10 team are a bunch of IDIOTS for not implementing a cleaner MODULAR way for sysadmins to override these goddamn associations. This feels like trying to balance a bowling ball on a fingertip. I spent a week to figure this crap out to try prevent related tech support calls from our 15,000 dumb users after our upcoming Win10 rollout. Hell, I suspect the association will just spontaneously reset over some update and all this will have been for nothing.

    On a site note, during my tests I tried nuking from orbit all references to AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723 in the registry, but UserChoice would STILL revert to that value, even thought it was not present anymore anywhere. I found out that there is a clean copy of OEMDefaultAssociations.xml embedded as a resource within C:\Windows\System32\shell32.dll, I think that's where it comes from. However, the only way to edit that file is by booting to a different OS, so I haven't tried messing with it.

    • Edited by AgentRev Friday, August 18, 2017 9:19 PM
    Friday, August 18, 2017 6:56 PM
  • As mentioned, doing the DISM online import overwrites the OEMDefaultAssociations.xml file so you want to make sure you include all the extensions not just the ones you want to change otherwise you will get a lot of file association notifications saying the default application has changed.  Fortunately, Windows 10 is smart enough to fix them and set them back to default.  Unfortunately, doing a DISM export and import doesn't include ApplyOnUpgrade or OverwriteIfProgIdIs sections.  Manually adding those back is tedious and has lots of room for error.  What I've been doing to be on the safe side is to simply change the one line I needed changed in the existing OEMDefaultAssociations.xml file using PowerShell.  I created a simple script which I packaged in SCCM and then deploy during OSD so even the built in administrator account has the correct associations.  I have a custom branding step after Set Status 4 where I set certain things like Start Menu/Task Bar layout and file assocations, etc.. The script is below.  For now I just use it to set Reader DC (Classic) as the default but you can modify it to change any associations as needed.  Hope this helps someone.

    $filepath ="$env:SystemDrive\Windows\System32"
    $filename = "\oemdefaultassociations.xml"
    $filefullpath = $filepath + $filename
    $findstring = '<Association Identifier=".pdf" ProgId="AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j;AppXk660crfh0gw7gd9swc1nws708mn7qjr1" />'
    
    #Replace ProgID= with the correct ProgID for the application you have installed.
    $replacestring = '<Association Identifier=".pdf" ProgId="AcroExch.Document.2015" ApplicationName="Adobe Acrobat Reader DC" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723" />'
    
    (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath

    Thanks Jerrypanski - that worked for me with Win 10 1703.

    i looked first in the oemdefaultassociations.xml file and looked for the original pdf row.
    I changed in your script the OverwriteIfProgIdIs to the value from my oemdefaultassociations.xml

    I also changed the values in the replascestring -> ProgId and ApplicationName because i use Adobe Reader DC 2017. I checked the OverwriteIfProgIdIs but they are OK

    I run the script and the row was changed perfectly. There was just one problem -if i logged on with a new user i got an notification that the pdf file association was reset and the pdf viewer was set again to Edge.

    I figured out that the oemdefaultassociations.xml was ANSI and not UTF8 encoded. so i changed the Set-Content command from your script to -> Set-Content -Encoding UTF8 $filefullpath

    Now its working perfectly. The default value is set to Adobe Reader DC 2017 and the user can change it. 

    Its unbelievable that microsoft has no solution for this - this problem take me 3 days to solve it...

    Monday, September 25, 2017 1:51 PM
  • Did you manage to get this working for users who got migrated previously using USMT? Or only new users who logged in?

    We are using 1703 and using USMT to go from Win 7. New users default apps are set correctly, however any user profiles that get migrated just get ignored completely. I dont event get the normal message of "A Default App was reset".

    Wednesday, October 4, 2017 10:10 PM
  • The issue was identified 2 years ago, yet Microsoft seem to be happy to leave administrators all over the world spending millions of hours solving it.  Why would any business owners in their right minds upgrade to Windows 10 given the huge support cost overhead?
    Wednesday, October 4, 2017 11:17 PM
  • Are you really surprised? Microsoft doesn't care at all since they know you're not going to switch to a different operating system. They have a monopoly when it comes to corporate user networks. There isn't even a solution for already existing users, only for new users. 

    The only reason to upgrade to Windows 10 is because of features that are already free on Linux and other systems, such as 2 factor (Windows Hello), Full Disk Encryption (Bitlocker), much needed security improvements... 


    Friday, October 6, 2017 2:58 PM
  • On 1607 I was able to get it working with the DISM import by mounting the VHD (I'm assuming mounting a WIM will work the same) and deleting the OEMDefaultAssociations.xml in System32.

    A post above me mentioned this file and it got me thinking. Originally I had the DISM import command as a step in my task sequence. It succeed the first time i imaged the VM, then the task sequence errored out after that. Once I disabled that task sequence step the errors were gone.

    Seems like the problem (or maybe its by design) is that the DISM Import command only works if that OEMDefaultAssociations.xml isn't there and errors out (rather than overwriting) if it is there. 

    Monday, November 13, 2017 2:33 PM
  • As Title says, i have problem since new 1511 build i cant set default apps in my sysprep images.

    Dism.exe /online /Export-DefaultAppAssociations:c:\AppAssoc.xml

    Than later before sysprep

    Dism.exe /online /Import-DefaultAppAssociations:c:\AppAssoc.xml

    This worked since windwos 7, and it also worked on previous windows 10 build (tho not perfect, some apps where not changed).

    Now it doesnt work at all, not single app gets set.

    I think the problem is "Than later before sysprep"!

    It is should AFTER sysprep.

    I do that as following.

    1. Change the export file name to "OEMDefaultAssociations.xml".
    2. Sysprep system and shutdown.
    3. Copy "OEMDefaultAssociations.xml" to "driverletter or mount dir":\Windows\System32\
    4. Capture the syspreped system.

    That is OK!

    • Edited by Kevin_Dai Monday, November 13, 2017 3:02 PM
    Monday, November 13, 2017 2:59 PM
  • 1.Set up a reference computer
    2.Install applications
    3.Set up Default Programs and configure default apps associations
    4.Export the custom default app association by typing following command into POWERSHELL:

    Dism /online /export-defaultappassociations:C:\CustomFileAssoc.xml

    Note that you need  POWERSHELL and administrator rights to use dism.exe, it didn't work for me in CMD or DEPLOYMENT AND IMG. TOOLS ENV.

    5.Copy the XML file on USB stick, DO NOT delete any file associations entries! A missing entry will trigger the App default reset notification.

    6.SysPrep and capture your image

    7.Mount your image by typing following command into POWERSHELL:

    dism /mount-wim /wimfile:c:\YourWinImage.wim /index:1 /mountdir:c:\win10_img\mount

    8.Import the XML from USB stick by typing following command into POWERSHELL:

    Dism /online /import-defaultappassociations:d:\CustomFileAssoc.xml

    9.)Unmount your image

    dism /unmount-wim /mountdir:c:\win10_image\mount /commit

    Using above mentioned commands via "command line" or "Deployment and Img. Tools Env." didn't work for me, default apps were not changed.  USE POWERSHELL!!!

    Cheers,



    • Edited by Zarison Monday, December 18, 2017 1:59 PM
    Monday, December 18, 2017 11:53 AM
  • Would someone please answer this question.... Where can I find out about this option?

    Where does one find the proper value for this option?

    Where can I find a complete description of this options, when and why it would be used and how to tell what value needs to be assigned to it?

    Thanks,

    Ralph

    Monday, March 19, 2018 4:35 PM
  • Would someone please answer this question.... Where can I find out about this option?

    Where does one find the proper value for this option?

    Where can I find a complete description of this options, when and why it would be used and how to tell what value needs to be assigned to it?

    Thanks,

    Ralph

    **********************

    Hello, 

    Where did you find out about the OverwriteIfProgIdIs option?

    Is there any official documentation available?

    This option worked to solve a similar symptom, but I'd like to know how and why, especially if there are more options available in the schema.

    *****************

    This is the question I need answered please.

    Thanks to all

    Ralph


    Wednesday, March 21, 2018 4:50 PM
  • Hi Zarison,

    Thanks for the instructions.  I'm getting an error on export but I'm running it from the "Administrator" account that gets auto-logged on in the pre-OOBE environment that is launched from CTRL-SHIFT-F3 at the first boot OOBE stage.  I customized everything there as MS suggests but it seems the default "Administrator" profile is not compatible with the export process.  To my question -  Are you setting up your reference computer using the pre-OOBE Administrator account or are you setting up a regular local user account to configure and export the default asssociations?  If the former, did you run into this issue and if so, how did you fix it?  

    I look forward to your reply.
    -felipe



    Wednesday, April 4, 2018 5:22 PM
  • this one worked for me... nice work my friend.
    Wednesday, September 12, 2018 4:39 AM
  • In this thread, was there mention of how to change the default for current users? Don't want to use GPO because they'll have to change it to their preference every time they log in. Only solution I've found is to deploy the registry key change in the "user choice" container. Either via SCCM or some third party app. This way the current user can still change their default app from IE back to Edge if they prefer. 
    Wednesday, December 5, 2018 11:30 PM
  • I've been trying to find a resolution for this issue for the last year and finally found this thread--it's been the most helpful out of the tons of threads that exist out there for this same problem.  Absolutely astounding to me that this issue has been identified since 2015 and has existed for users in every subsequent build since then.  I'm still testing out modifying the OEMDefaultAssociations.xml file w/ the ApplyOnUpgrade and OverwriteIfProgIdIs options added in--the results so far have been encouraging, but now I need to test it out on a domain-bound computer in our prod environment.  The fact that sys admins like those at my site and on this thread have had to spend time, resources, and money on figuring out a hack to MS's own recommended method for setting app defaults (DISM/GPO) which DOES NOT WORK is infuriating. Nevermind the complete lack of recognition from MS on this issue...

    This issue is just scratching the surface of all of the nightmares we have experienced since adopting Win10 in our environment:

    --why do users in my enterprise environment need apps like X-Box Live, MS Store, Edge, Mail, etc. and much more importantly, why can't I as a sys admin completely remove, or at the very least ,disable these apps?

    --why do user-defined app defaults get reset after each feature update? apparently "user choice" does not mean the same thing to MS as it does to everyone else...

    --shameless and incessant pushing of MS products that we don't want and simply don't work in our org. examples-go to change default web browser to anything from Edge, get a message saying "are you sure? Edge is better"; run a google search from any browser other than Edge and have to scroll through a pushy ad for Edge before seeing search results; and Edge as a default PDF viewer???

    Anyway, I finally decided to open a case about this w/ MS today.  I have very very low hopes that it will actually make its way on to someone's radar who actually cares and is able/willing to recognize and fix this issue.  Also, just another example of how crappy MS is, the support agent I chatted w/ said that I should submit my feedback to the "Feedback Hub" as well.  I click the link he gave me, expecting to be taken to a website where I can post details about my problem, and OF COURSE the link is to a listing on the MS App Store for an app called "Feedback Hub".  I click the button to try to report my feedback and get a message that I have to go and enable diagnostic data collection to do so...are you kidding me???  Even if I wanted to enable that setting (trust MS w/ my org's data???) I can't because it is disabled by domain policy.  I'm not even trying to leave feedback about a specific device--why do I have to let MS collect data from one of my machines just to properly report an issue that is affecting ALL of our users/endpoints?  Leave it to MS to require customers to download an app from their app store just to report an issue that SHOULD HAVE BEEN FIXED A LONG TIME AGO!! I'll post again if I get any promising updates...

    Friday, February 22, 2019 8:55 PM
  • I will give that one a try today.  I have the ability to edit my Image File, after it has been deployed to an Appliance (K2000).

    If I understand correctly, I simply overwrite the file that is there - with the one I create, and make sure the name is changed.

    Wednesday, March 20, 2019 4:50 PM