If you are like me, you are pushing the latest Sun Java's with Zenworks to
keep ahead of the security issues & viruses;

http://www.informationweek.com/softw...leID=179102716

The problem with Sun Java, however, is that each time you install a newer
version, the Java installer does not remove the older version. If a
vulnerability requires a certain version, they can code for a prefered
version and the java app will run in that version of Java, if installed.

So while I have 1.5.0 build 6 installed, the fact that 1.4.0 is still
installed leaves me vulnerable.

Sun Java has also used 3 different installers over the last several years
for installing on Windows.

So if you haven't been uninstalling these old Sun Java's, you need to be.
And this is how;

Create a zen app as normal. Set it to run as a secure system user. In the
distribution scripts, put the following in place;

msiexec /uninstall "{3248F0A8-6813-11D6-A77B-00B0D0150020}" /qn /norestart

msiexec /uninstall "{3248F0A8-6813-11D6-A77B-00B0D0150030}" /qn /norestart

msiexec /uninstall "{3248F0A8-6813-11D6-A77B-00B0D0150040}" /qn /norestart

msiexec /uninstall "{3248F0A8-6813-11D6-A77B-00B0D0150050}" /qn /norestart

msiexec /uninstall "{3248F0A8-6813-11D6-A77B-00B0D0150060}" /qn /norestart

msiexec /uninstall "{3248F0A8-6813-11D6-A77B-00B0D0150010}" /qn /norestart

msiexec /uninstall "{3248F0A8-6813-11D6-A77B-00B0D0150000}" /qn /norestart

msiexec /x "J2SE Runtime Environment 5.0.msi" /qn /norestart

msiexec /x "J2SE Runtime Environment 5.0 Update 1.msi" /qn /norestart

msiexec /x "J2SE Runtime Environment 5.0 Update 2.msi" /qn /norestart

msiexec /x "J2SE Runtime Environment 5.0 Update 3.msi" /qn /norestart

msiexec /x "J2SE Runtime Environment 5.0 Update 4.msi" /qn /norestart

msiexec /x "J2SE Runtime Environment 5.0 Update 5.msi" /qn /norestart

msiexec /uninstall "{7148F0A8-6813-11D6-A77B-00B0D0142000}" /qn /norestart

msiexec /uninstall "{7148F0A8-6813-11D6-A77B-00B0D0142010}" /qn /norestart

msiexec /uninstall "{7148F0A8-6813-11D6-A77B-00B0D0142020}" /qn /norestart

msiexec /uninstall "{7148F0A8-6813-11D6-A77B-00B0D0142030}" /qn /norestart

msiexec /uninstall "{7148F0A8-6813-11D6-A77B-00B0D0142040}" /qn /norestart

msiexec /uninstall "{7148F0A8-6813-11D6-A77B-00B0D0142050}" /qn /norestart

msiexec /uninstall "{7148F0A8-6813-11D6-A77B-00B0D0142060}" /qn /norestart

msiexec /uninstall "{7148F0A8-6813-11D6-A77B-00B0D0142070}" /qn /norestart

msiexec /uninstall "{7148F0A8-6813-11D6-A77B-00B0D0142080}" /qn /norestart

msiexec /uninstall "{7148F0A8-6813-11D6-A77B-00B0D0142090}" /qn /norestart

msiexec /uninstall "{7148F0A8-6813-11D6-A77B-00B0D0142100}" /qn /norestart

"C:\Program Files\InstallShield Installation
Information\{F4588301-0A06-11D6-A761-00B0D079AF64}\setup.exe" -s
-f1"\\server\volume\uninstall140.iss"

"C:\Program Files\InstallShield Installation
Information\{ACD27BF3-7CDC-11D7-9D4D-00010240CE95}\setup.exe" -s
-f1"\\server\volume\uninstall14104.iss"



The script engine location is;
%*WINSYSDIR%\CMD.EXE /C

and the extension is
..bat

You will also need these two .iss files saved off onto your \\server\volume

uninstall140.iss is;

[InstallShield Silent]
Version=v6.00.000
File=Response File
[File Transfer]
OverwrittenReadOnly=NoToAll
[{F4588301-0A06-11D6-A761-00B0D079AF64}-DlgOrder]
Dlg0={F4588301-0A06-11D6-A761-00B0D079AF64}-SprintfBox-0
Count=2
Dlg1={F4588301-0A06-11D6-A761-00B0D079AF64}-File Transfer
[{F4588301-0A06-11D6-A761-00B0D079AF64}-SprintfBox-0]
Result=1
[Application]
Name=Java 2 Runtime Environment, SE v1.4.0
Version=1.4.0
Company=JavaSoft
Lang=0009
[{F4588301-0A06-11D6-A761-00B0D079AF64}-File Transfer]
SharedFile=YesToAll


and uninstall uninstall14104.iss is;

[InstallShield Silent]
Version=v6.00.000
File=Response File
[File Transfer]
OverwrittenReadOnly=NoToAll
[{ACD27BF3-7CDC-11D7-9D4D-00010240CE95}-DlgOrder]
Dlg0={ACD27BF3-7CDC-11D7-9D4D-00010240CE95}-SprintfBox-0
Count=2
Dlg1={ACD27BF3-7CDC-11D7-9D4D-00010240CE95}-SdFinishReboot-0
[{ACD27BF3-7CDC-11D7-9D4D-00010240CE95}-SprintfBox-0]
Result=1
[Application]
Name=Java 2 Runtime Environment, SE v1.4.1_04
Version=1.4.1_04
Company=JavaSoft
Lang=0009
[{ACD27BF3-7CDC-11D7-9D4D-00010240CE95}-SdFinishReboot-0]
Result=1
BootOption=0




This has taken me about 6 hours to create. I am missing 1.4.1 build 01
through 03 so if anyone has those and can add to this, that would be great.
I've also never installed any 1.3 version so if anyone has those and can
add to this, that'd be great also.

There are two entrys for the newer 1.5.0 builds which cover two different
ways they could have been installed. If a version doesn't exist, no harm.
Zen will just go onto the next one.