Skip to content

Instantly share code, notes, and snippets.

@Alexhha
Created May 20, 2019 12:16
Show Gist options
  • Save Alexhha/0a99b4277e96239ca6957bdb31d771fa to your computer and use it in GitHub Desktop.
Save Alexhha/0a99b4277e96239ca6957bdb31d771fa to your computer and use it in GitHub Desktop.
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
$url = "https://github.com/ojdkbuild/ojdkbuild/releases/download/11.0.3-1/java-11-openjdk-11.0.3.7-1.windows.ojdkbuild.x86_64.msi"
$file = "C:\Users\alex\Downloads\java-11-openjdk-11.0.3.7-1.windows.ojdkbuild.x86_64.msi"
(New-Object -TypeName System.Net.WebClient).DownloadFile($url, $file)
$installJava = (Start-Process -FilePath "msiexec.exe" -ArgumentList "/i C:\Users\alex\Downloads\java-11-openjdk-11.0.3.7-1.windows.ojdkbuild.x86_64.msi /quiet" -Wait -Passthru).ExitCode
Write-VerboseLog "Install Java code $installJava."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment