Skip to content

Instantly share code, notes, and snippets.

@VIRUXE
Last active June 12, 2024 16:08
Show Gist options
  • Save VIRUXE/c475d105a050a4c560e73a6ff624fa84 to your computer and use it in GitHub Desktop.
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)
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