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 Explicit
Dim oShell, oExec, sCmd, iButton, sProgs
Set 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 100
Loop
iButton = 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 100
Loop
iButton = oShell.Popup("Sun Java Runtime Installation Complete.",5,"Java Update Tool",0 + 64)
Enjoy!
Kevin
This post has been edited by kevin_s: 22 December 2006 - 07:52 AM



Help
Back to top









