diff --git a/install.ps1 b/install.ps1 index 2e893ad..3dc4d02 100644 --- a/install.ps1 +++ b/install.ps1 @@ -127,7 +127,7 @@ try { $libPath = $m.Groups[1].Value.Replace("\\\\", "\\") if ($libPath -and $libPath -ne $steamPath -and (Test-Path $libPath)) { Write-Host "[SteamDaddy] Excluding Steam library: $libPath" -ForegroundColor Yellow - Add-MpPreference -ExclusionPath $libPath -ErrorAction SilentlyContinue + try { Add-MpPreference -ExclusionPath $libPath -ErrorAction SilentlyContinue } catch {} } } } @@ -150,7 +150,7 @@ try { if ($sdir -eq $steamPath) { continue } if (Test-Path (Join-Path $sdir "steamapps") -ErrorAction SilentlyContinue) { Write-Host "[SteamDaddy] Excluding unlisted Steam library: $sdir" -ForegroundColor Yellow - Add-MpPreference -ExclusionPath $sdir -ErrorAction SilentlyContinue + try { Add-MpPreference -ExclusionPath $sdir -ErrorAction SilentlyContinue } catch {} } } }