Files
management-scripts/Install-AmazonCorretto.ps1
T

16 lines
512 B
PowerShell
Raw Normal View History

2020-07-31 12:44:03 -04:00
param(
[int]$Version=11
)
## Supported versions: 8 and 11
## Convert int to string
[string]$Version = $Version.ToString()
## Get the correct URL
2019-11-11 19:22:39 -05:00
If ( Test-Path "${Env:ProgramFiles(x86)}" )
2020-07-31 12:44:03 -04:00
{ $URL = "https://corretto.aws/downloads/latest/amazon-corretto-${Version}-x64-windows-jdk.msi" }
Else { $URL = "https://corretto.aws/downloads/latest/amazon-corretto-${Version}-x86-windows-jdk.msi" }
2019-11-11 19:22:39 -05:00
## Install Amazon Corretto
Start-Process -FilePath "msiexec.exe" -ArgumentList "/i ${URL} /qn /norestart" -Wait