/
SetupWorkshop.ps1
20 lines (16 loc) · 834 Bytes
/
SetupWorkshop.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
. (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] + ")")
}