December 21, 200619 yr I have written a VBScript to perform a silent installation of the Sun Java Runtime. Given that I've borrowed SO much from these forums, I figured I should register and give something back. This script installs Java to C:\Program Files\Java. It disables the Java auto-update, disables the creation of the "Java Web Start" shortcut and integrates with Internet Explorer and Firefox.Assumption : You have this version of the JRE and the Microsoft VM uninstaller. You can google unmsjvm.exe and get a copy. Option ExplicitDim oShell, oExec, sCmd, iButton, sProgsSet oShell = WScript.CreateObject("WScript.Shell")sProgs = oShell.ExpandEnvironmentStrings("%ProgramFiles%")iButton = oShell.Popup("Removing Microsoft Java VM",3,"Java Update Tool",0 + 64)sCmd = "unmsjvm.exe /q"Set oExec = oShell.Exec(sCmd)Do While oExec.Status = 0 WScript.Sleep 100LoopiButton = oShell.Popup("Microsoft Java VM Removed. Now Installing Sun Java VM",3,"Java Update Tool",0 + 64)sCmd = "jre-1_5_0_10-windows-i586-p-s.exe /s ADDLOCAL=jrecore IEXPLORER=1 MOZILLA=1 INSTALLDIR=C:\Progra~1\Java REBOOT=Suppress JAVAUPDATE=0 WEBSTARTICON=0"Set oExec = oShell.Exec(sCmd)Do While oExec.Status = 0 WScript.Sleep 100LoopiButton = oShell.Popup("Sun Java Runtime Installation Complete.",5,"Java Update Tool",0 + 64)Enjoy!Kevin Edited December 22, 200619 yr by kevin_s
December 23, 200619 yr you can also use thie switches to install it silentlysetup.exe /s /v/qb /norestart it works for the latest version. you can also export reg entries to save your settings..
Create an account or sign in to comment