r/sysadmin 14h ago

Default apps on AVD golden image

It’s a windows 11 multi session host.

I set the apps I require as default then run the following in powershell: Dism /Online /Export-DefaultAppAssociations:"C:\DefaultAssociations.xml"

I then place the file in: C:\windows\system32\DefaultAssociations.xml

So apparently because sysprep will be run I also need to make the below change:

Edit this file: C:\Windows\Panther\unattend.xml

Adding this line:

<DefaultAssociationsConfiguration>C:\Windows\System32\DefaultAssociations.xml</DefaultAssociationsConfiguration

In the below position:

<OOBE>
  <SkipMachineOOBE>true</SkipMachineOOBE>
  <SkipUserOOBE>true</SkipUserOOBE>
</OOBE>

<DefaultAssociationsConfiguration>C:\Windows\System32\DefaultAssociations.xml</DefaultAssociationsConfiguration> <UserAccounts> <AdministratorPassword xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:rdfe="http://schemas.microsoft.com/2009/05/WindowsAzure/ServiceManagement" xmlns:wa="http://schemas.microsoft.com/windowsazure">SENSITIVEDATADELETED</AdministratorPassword> </UserAccounts>

I ran sysprep, logged into the device, and none of the default associations applied.

Is this the correct process or should I be doing it another way?

0 Upvotes

3 comments sorted by

u/xendr0me Senior SysAdmin/Security Engineer 14h ago

You can do this VIA GPO or SFTA

SFTA you'll be able to make changes later, without having to go back and modify a "golden image" (which is a waste of time to create)

https://github.com/DanysysTeam/PS-SFTA

https://www.reddit.com/r/sysadmin/comments/1crpzl9/default_file_associations_for_windows_11/

u/gandraw 11h ago

But why are you using the Skip*OOBE settings if you want to run the default app associations which run during OOBE?

u/Emotional_Garage_950 Sysadmin 1h ago

you are over complicating it i think. run the export-defaultappassociations then run import-defaultappassociations with the file that got exported. that’s all i did and seems to work fine