Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[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