Last active
June 29, 2018 13:01
-
-
Save carlcantprogram/42fbecb399af7e8ce4c0 to your computer and use it in GitHub Desktop.
Oracle JDK7 Download Install powershell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$url = 'http://download.oracle.com/otn-pub/java/jdk/7u60-b19/jdk-7u60-windows-x64.exe' | |
$filename = $url.Substring($url.LastIndexOf("/") + 1); | |
$client = new-object System.Net.WebClient; | |
$client.Headers.Add("Cookie", "oraclelicense=accept-securebackup-cookie"); | |
$client.DownloadFile( $url, $filename ); | |
$result = (Start-Process -FilePath $filename -ArgumentList "/quiet /qn /norestart /l* jdk7_install.log" -Wait -Passthru).ExitCode; | |
echo $result; | |
Get-WmiObject -Class Win32_Product -Filter "Name LIKE '%java%SE Development Kit 7%'"; | |
# IdentifyingNumber : {64A3A4F4-B792-11D6-A78A-00B0D0170600} | |
# Name : Java SE Development Kit 7 Update 60 (64-bit) | |
# Vendor : Oracle | |
# Version : 1.7.0.600 | |
# Caption : Java SE Development Kit 7 Update 60 (64-bit) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment