update
This commit is contained in:
@@ -1,7 +1,16 @@
|
||||
## Get the correct URL
|
||||
param(
|
||||
[int]$Version=11
|
||||
)
|
||||
|
||||
## Supported versions: 8 and 11
|
||||
|
||||
## Convert int to string
|
||||
[string]$Version = $Version.ToString()
|
||||
|
||||
## Get the correct URL
|
||||
If ( Test-Path "${Env:ProgramFiles(x86)}" )
|
||||
{ $URL = 'https://corretto.aws/downloads/latest/amazon-corretto-11-x64-windows-jdk.msi' }
|
||||
Else { $URL = 'https://corretto.aws/downloads/latest/amazon-corretto-8-x86-windows-jdk.msi' }
|
||||
{ $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" }
|
||||
|
||||
## Install Amazon Corretto
|
||||
Start-Process -FilePath "msiexec.exe" -ArgumentList "/i ${URL} /qn /norestart" -Wait
|
||||
Reference in New Issue
Block a user