Try fixing the default browser association

This commit is contained in:
Manuel Thalmann 2023-07-20 20:19:35 +02:00
parent 7fcd6303d7
commit 541e523f5c

View file

@ -5,14 +5,14 @@ function Install-Firefox {
param([Context] $context) param([Context] $context)
$tempDir = $context.GetTempDirectory(); $tempDir = $context.GetTempDirectory();
$configFile = "DefaultAssociations.xml";
Push-Location $tempDir; Push-Location $tempDir;
$configFile = "$tempDir/DefaultAssociations.xml";
Write-Host "Installing Firefox"; Write-Host "Installing Firefox";
choco install -y firefox; choco install -y firefox;
Write-Information "Making Firefox the default browser"; Write-Information "Making Firefox the default browser";
DISM /Online "/Export-DefaultAppAssociations:DefaultAssociations.xml"; DISM /Online "/Export-DefaultAppAssociations:$configFile";
[xml]$defaultAssociations = [xml]::new(); [xml]$defaultAssociations = [xml]::new();
$defaultAssociations.PreserveWhitespace = $true; $defaultAssociations.PreserveWhitespace = $true;