Doesn't Hudson know how to automatically install JDKs now, you ask? Why yes, it does, but it doesn't always have the latest JDK updates. Apparently update 18 fixes some obscure issue that one of our customers has, and according to Ninite it is already out, but I can't yet find it on java.sun.com.(Apparently snapshot releases can be found here.)
After deducing the JDKs use an MSI installer (although packaged within an exe), I enabled verbose logging and found out the names of the feature groups:
On to the point, to perform a silent installation (in this case jdk 1.6.0_17), simply do:
jdk-6u17-windows-i586.exe /qn ADDLOCAL=ToolsFeature,SourceFeature,JavaDBFeature INSTALLDIR=c:\jdk1.6.0_17 REBOOT=ReallySuppress
- /qn means "No UI"
- INSTALLDIR is self explanatory
- REBOOT has a few options, I chose ReallySuppress
- ADDLOCAL - Specify a comma-separated list of features you want from the list shown earlier, or you can use ADDALL
At last, I have my auto install script that I can remotely run on a bunch of machines with PsExec.