Microsoft Build of OpenJDK with Hotspot 17 silent install and uninstall
The Microsoft Build of OpenJDK is a new no-cost long-term supported distribution and Microsoft's new way to collaborate and contribute to the Java ecosystem.
- Vendor
- Microsoft Corporation
- Category
- Runtimes
- Installer
- Windows Installer (MSI, built with WiX)
- Architecture
- x64, arm64
- Checked version
- 17.0.20.101
- winget ID
Microsoft.OpenJDK.17- Product code
{3C66AA47-1011-4188-949F-21AFBAEE9394}- License
- GPL2 with Classpath Exception
- Download
- Official download
Silent install
msiexec /i microsoft-jdk-17.0.20.1-windows-x64.msi /qn /norestart ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome - Download the installer from the direct download link.
- Open an elevated Command Prompt: right-click Command Prompt and select Run as administrator.
- Change to the folder with the installer, for example
cd C:\Temp. - Run the command above. Adjust the file name if you downloaded a different version.
Or install with winget
winget install --id Microsoft.OpenJDK.17 --exact --silent --scope machine --accept-package-agreements --accept-source-agreements Silent uninstall
msiexec /x {3C66AA47-1011-4188-949F-21AFBAEE9394} /qn /norestart winget uninstall --id Microsoft.OpenJDK.17 --exact --silent --accept-source-agreements Run the command from an elevated Command Prompt.
About the Windows Installer (MSI, built with WiX) installer
An MSI built with the WiX Toolset. It is installed with msiexec and accepts the standard MSI switches.
| Switch | What it does |
|---|---|
/qn | No user interface. |
/norestart | Never restart, even if the installation needs it. |
/l*v "C:\Temp\install.log" | Verbose log file. |
Deploy Microsoft Build of OpenJDK with Hotspot 17 with Microsoft Intune
Package the installer as a Win32 app (.intunewin) and use these settings:
| Install command | msiexec /i microsoft-jdk-17.0.20.1-windows-x64.msi /qn /norestart ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome |
|---|---|
| Uninstall command | msiexec /x {3C66AA47-1011-4188-949F-21AFBAEE9394} /qn /norestart |
| Install behavior | System |
| Detection rule | MSI product code {3C66AA47-1011-4188-949F-21AFBAEE9394} |