nav-arm-templates/SetupWorkshop.ps1

21 строка
834 B
PowerShell

. (Join-Path $PSScriptRoot "Install-VS2017Community.ps1")
try {
$Folder = "C:\DOWNLOAD\AdobeReader"
$Filename = "$Folder\AdbeRdr11010_en_US.exe"
New-Item $Folder -itemtype directory -ErrorAction ignore | Out-Null
if (!(Test-Path $Filename)) {
AddToStatus "Downloading Adobe Reader"
$WebClient = New-Object System.Net.WebClient
$WebClient.DownloadFile("http://ardownload.adobe.com/pub/adobe/reader/win/11.x/11.0.10/en_US/AdbeRdr11010_en_US.exe", $Filename)
}
AddToStatus "Installing Adobe Reader (this should only take a few minutes)"
Start-Process $Filename -ArgumentList "/msi /qn" -Wait -Passthru | Out-Null
Start-Sleep -Seconds 10
} catch {
AddToStatus -color Red -line ($Error[0].ToString() + " (" + ($Error[0].ScriptStackTrace -split '\r\n')[0] + ")")
}