我们有一个依赖于 Java 的应用程序,我们正在使用 SCCM 安装程序将其推送给客户端。
由于 Java 几乎每月更新一次(旧更新会在 30 天后过期),我们正在寻找一种方法让 SCCM 安装程序与最新的 Java 版本保持更新。我们能够从我们的 SCCM 安装程序运行 Powershell 脚本,但我们还没有找到编写脚本来自动下载和安装最新 Java 版本的方法。
有谁知道这是否可行,我们该如何着手?
提前致谢!
最佳答案
请看this用于使用 powershell 和 this 下载文件用于安装 java 静默。 例如:
Invoke-WebRequest $address -OutFile $destination
# $addressis the http-address of the installer
# $destination is a Path where the the downloadoutput should saved to
$destination /s
# with the '/s' Parameter you are starting the installer silent
如果你能得到下载链接,你应该能够下载并安装java。但是atm我不知道你怎么能得到链接。 我希望这会有所帮助。
关于java - 将 Java 更新到最新版本的 Powershell 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26611383/