Forum Discussion

jfdoyon's avatar
jfdoyon
Copper Contributor
Nov 22, 2022

Default App Associations nightmare

Trying to deploy Windows 11 via autopilot with particular file associations.

 

I know the Policy CSP way via config profile, but that does not quite do what I want it to.

 

Ideally, I want to modify the OEMDefaultAssociations.xml to set the .pdf extension to NOT be taken over by Edge (Which best I can tell still happens, even with Edge configured to never open PDFs).

 

Problem is I've tried editing this file directly, using dism to export / import setting, nothing I do that is image / wim / dism related seems to do anything at all.

 

- I did a remediation script to edit the file.

- I did a powershell script to edit the file

- I did a win32app with the xml that runs the dism command, which imports the file OK, but does nothing to the users' file associations.

 

So far the only way I've seen it work is via a config profile that uses the Policy CSP. Problem is that reapplies the settings on every log on, which I don't necessarily want. I just want to prevent edge from taking it over, but to also let users chose their own app if they need to.

 

A line like this in the XML:

 

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

 

Should do the trick, but you can't feed that to the Policy CSP it seems, it throws errors. Hence the attempts via the OEMDefaultAssociations.xml.

 

But changing that file does NOTHING, even though docs suggest it should: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/export-or-import-default-application-associations?view=windows-11

 

I suspect OEMDefaultAssociations.dll is actually used, and it contains an XML copy of the file as a resource.

 

Help! Anyone succeed at working file associations in a sane way?

 

Thanks

 

2 Replies

  • GrahamBotes's avatar
    GrahamBotes
    Copper Contributor

    jfdoyon I have overwritten the file OEMDefaultAssociations.xml in the past and it has worked for me.
    Once the file has been changed it will only take effect on any new profile created, existing profiles will experience no change.

    • jfdoyon's avatar
      jfdoyon
      Copper Contributor
      Yeah, I am aware of that behaviour ... with MEM the trick is to try and make sure the change happens before any profile is created the first time. This is actually not hard.

      Having no luck, I actually opened up the install.wim and edited the file directly in there, did a full re-install, and yet, nothing.

      I can't help but wonder whether being an Autopilot / Intune device somehow changes things, or whether it's a Windows 11 thing ,.. or both.

      I may open a ticket with Microsoft if this annoys me long enough!

Resources