Last active
June 12, 2024 16:08
-
-
Save VIRUXE/c475d105a050a4c560e73a6ff624fa84 to your computer and use it in GitHub Desktop.
Download and Install .NET Framework 4.5.2 (required for C# development on FiveM)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-Host "Downloading .NET Framework 4.5.2..." | |
$outputFile = "dotNetFramework452.exe" | |
Try { | |
Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=397673&clcid=0x409" -OutFile $outputFile | |
If (Test-Path $outputFile) { | |
Write-Host "Download complete. Installing..." | |
Start-Process $outputFile -Args "/quiet /norestart" -Wait | |
Write-Host ".NET Framework 4.5.2 installed successfully." | |
} Else { | |
Write-Host "Download failed: File not found." | |
} | |
} Catch { | |
Write-Host "An error occurred: $_" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment