From be4a3228da2b5a0c0b4434e5255b7d60c6036f3f Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 8 Aug 2024 05:04:59 +0200 Subject: [PATCH] Fix broken XML document creation --- scripts/Windows/Scripts/AppAssociations.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/Windows/Scripts/AppAssociations.ps1 b/scripts/Windows/Scripts/AppAssociations.ps1 index a4af3c1c..50479cd9 100644 --- a/scripts/Windows/Scripts/AppAssociations.ps1 +++ b/scripts/Windows/Scripts/AppAssociations.ps1 @@ -32,7 +32,9 @@ $null = New-Module { function Get-DefaultAppAssociations { [OutputType([xml])] param() - [xml]::new().LoadXml(((DISM /Online /Get-DefaultAppAssociations) | Select-Object -Skip 6 | Select-Object -SkipLast 2 | Out-String)); + $result = [xml]::new(); + $result.LoadXml(((DISM /Online /Get-DefaultAppAssociations) | Select-Object -Skip 6 | Select-Object -SkipLast 2 | Out-String)); + $result; } <#