diff --git a/scripts/Windows/Scripts/AppAssociations.ps1 b/scripts/Windows/Scripts/AppAssociations.ps1 index 403a125b..327f99f4 100644 --- a/scripts/Windows/Scripts/AppAssociations.ps1 +++ b/scripts/Windows/Scripts/AppAssociations.ps1 @@ -30,7 +30,11 @@ $null = New-Module { $association.ApplicationName = $applicationName; $configFile = New-TemporaryFile; - $associations.Save($configFile.FullName); + $writerSettings = [System.Xml.XmlWriterSettings]::new(); + $writerSettings.Indent = $true; + $writerSettings.Encoding = [System.Text.UTF8Encoding]::new(); + $writer = [System.Xml.XmlWriter]::Create($configFile.FullName, $writerSettings); + $associations.Save($writer); DISM /Online "/Import-DefaultAppAssociations:$($configFile.FullName)"; Remove-Item $configFile; }