Monorepo for Aesthetic.Computer aesthetic.computer
at main 47 lines 2.0 kB view raw
1# Quick install .NET Framework 4.8 Developer Pack using winget 2# Run as Administrator 3 4#Requires -RunAsAdministrator 5 6Write-Host "=========================================" -ForegroundColor Cyan 7Write-Host "Installing .NET Framework 4.8 Dev Pack" -ForegroundColor Cyan 8Write-Host "=========================================" -ForegroundColor Cyan 9Write-Host "" 10 11# Check if already installed 12$netfxRefPath = "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8" 13if (Test-Path $netfxRefPath) { 14 Write-Host "[OK] .NET Framework 4.8 Developer Pack already installed" -ForegroundColor Green 15 exit 0 16} 17 18# Try winget first 19if (Get-Command winget -ErrorAction SilentlyContinue) { 20 Write-Host "Installing via winget..." -ForegroundColor Yellow 21 winget install --id Microsoft.DotNet.Framework.DeveloperPack_4 --silent --accept-source-agreements --accept-package-agreements 22 23 # Check if installed 24 if (Test-Path $netfxRefPath) { 25 Write-Host "[OK] Installation successful!" -ForegroundColor Green 26 exit 0 27 } else { 28 Write-Host "[WARNING] winget completed but package not detected" -ForegroundColor Yellow 29 } 30} else { 31 Write-Host "[INFO] winget not available" -ForegroundColor Cyan 32} 33 34Write-Host "" 35Write-Host "=========================================" -ForegroundColor Yellow 36Write-Host "Manual Installation Required" -ForegroundColor Yellow 37Write-Host "=========================================" -ForegroundColor Yellow 38Write-Host "" 39Write-Host "Download from: https://dotnet.microsoft.com/download/dotnet-framework/thank-you/net48-developer-pack-offline-installer" -ForegroundColor Cyan 40Write-Host "" 41Write-Host "Or search for 'ndp48-devpack-enu.exe'" -ForegroundColor Gray 42Write-Host "" 43 44$openBrowser = Read-Host "Open download page now? (Y/n)" 45if ($openBrowser -ne 'n' -and $openBrowser -ne 'N') { 46 Start-Process "https://dotnet.microsoft.com/download/dotnet-framework/net48" 47}