Silently install the .NET framework v4.0

Download and install the .NET framework v4.0

    SilentInstallNET - Download and Install silently the .NET framework v4.0.
    File Name  : SilentInstallNET.ps1
    Author     : Fabrice ZERROUKI -
    PS D:\>SilentInstallNET.ps1
if(!(test-path $TempFolder))
{New-Item -path $TempFolder -type directory}
Write-Host ""
Write-Host "Downloading .NET framework v4.0 installation package" -ForegroundColor Yellow;
$src = ""
$dest = "$TempFolder" + "\" + "dotNetFx40_Full_x86_x64.exe"
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($src, $dest)
$args = " /q /norestart"
Write-Host "Installing .NET framework v4.0" -ForegroundColor Yellow;
Start-Process -FilePath $dest -ArgumentList $args -Wait
Remove-Item $TempFolder -recurse

Leave a Reply

Scroll to Top