Last active
June 1, 2021 18:00
-
-
Save chrisdpa-tvx/32f3864976af9ddb645df340f9230786 to your computer and use it in GitHub Desktop.
Install Java JRE on windows silently using powershell
This file contains 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=(Invoke-WebRequest -UseBasicParsing https://www.java.com/en/download/manual.jsp).Content | %{[regex]::matches($_, '(?:<a title="Download Java software for Windows Online" href=")(.*)(?:">)').Groups[1].Value} | |
Invoke-WebRequest -UseBasicParsing -OutFile jre8.exe $URL | |
Start-Process .\jre8.exe '/s REBOOT=0 SPONSORS=0 AUTO_UPDATE=0' -wait | |
echo $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't work :\