Sign in to follow this  
Followers 0
BigDaddyO

Uninstall ALL old Java versions

5 posts in this topic

Hello all,

Has anyone attempted to tackle the Ugly task of trying to Silently uninstall all of the older versions of Java that have the security flaws. I downloaded all of them and there are 65 different versions. Thankfully all of the Java 1.1 versions uninstall with one command. and 1.2 versions uninstall with one command also. The issue is that all of the Java 1.3 and 1.4 versions have individual uninstall commands which is going to suck because at least for some of the versions I have to Record an uninstall and then FileInstall the created iss file into the script to get rid of Java silently. What a pain in the A$$.

so, before I spend the next 3 - 4 days on this I am wondering if anyone else has tackled this problem.

Thanks,

Mike


Share this post


Link to post
Share on other sites



The issue is that all of the Java 1.3 and 1.4 versions have individual uninstall commands ..

Hi,

to uninstall Java Runtime 1.4.2_08 I use

j2re-1_4_2_08-windows-i586-p.exe /s /v"/qn REBOOT=Suppress" /x

to uninstall Java Runtime 1.5 (all Versions), example for 1.5.0_01

MsiExec.exe /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150010}

for 1.5.0_04 it would be

MsiExec.exe /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150040}

To uninstall Java 1.4 have a look at Uninstall Java 1.4


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Hi,

to uninstall Java Runtime 1.4.2_08 I use

j2re-1_4_2_08-windows-i586-p.exe /s /v"/qn REBOOT=Suppress" /x

to uninstall Java Runtime 1.5 (all Versions), example for 1.5.0_01

MsiExec.exe /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150010}

for 1.5.0_04 it would be

MsiExec.exe /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150040}

To uninstall Java 1.4 have a look at Uninstall Java 1.4

I don't have access on the machines to the actual Java Install files. and there is no way I am going to include 500 meg worth of installers just so I can uninstall the programs. for versions such as 1.4.1_07 I am using the following

FileInstall("D:\AutoIT-3\Java Uninstaller\14107setup.iss", @TempDir & "\14107setup.iss", 1)
    $Uninstall = RunWait('"' & @ProgramFilesDir & '\InstallShield Installation Information\{CA532E73-1BB7-11D8-9D6A-00010240CE95}\setup.exe" -s -SMS -f1"'& @TempDir & '\14107setup.iss"')

the .iss files are just 1K text files that won't take up that much room if I file include them. the only issue with the .iss files are they expect certain things to be in certain places, so I don't know if they will work properly on all systems.


Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

If you don't mind beta you might want to look at something like this, haven't tested/corrected the run command.

Edit: don't need to correct and test that, just use autoit's run command.

CODE

$strComputer = "."

$objShell = ObjCreate("WScript.Shell")

$objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $strComputer & "\root\cimv2")

$colSoftware = $objWMIService.ExecQuery ("Select * from Win32_Product where Caption LIKE '%Java%'")

For $objSoftware In $colSoftware

$String = "Description: " & $objSoftware.Description & @LF & _

"IdentifyingNumber: " & $objSoftware.IdentifyingNumber & @LF & _

"InstallDate: " & $objSoftware.InstallDate & @LF & _

"InstallDate2: " & $objSoftware.InstallDate2 & @LF & _

"InstallLocation: " & $objSoftware.InstallLocation & @LF & _

"InstallState: " & $objSoftware.InstallState & @LF & _

"Name: " & $objSoftware.Name & @LF & _

"PackageCache: " & $objSoftware.PackageCache & @LF & _

"SKUNumber: " & $objSoftware.SKUNumber & @LF & _

"Vendor: " & $objSoftware.Vendor & @LF & _

"Version: " & $objSoftware.Version

MsgBox(0, $objSoftware.Caption, $String)

;~ $objShell.Run("msiexec /x " & $objSoftware.IdentifyingNumber & " /qn /norestart"),10,True

Next

Gary

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

If you don't mind beta you might want to look at something like this, haven't tested/corrected the run command.

Edit: don't need to correct and test that, just use autoit's run command.

Gary

Gary,

Thanks for the info but the Java versions that use the MsiExec.exe are the easy ones to uninstall. They seem to have the same ID on any comptuer so I just hard code those in when uninstalling. My main problem is with the versions of Java that use the InstallShield. Those are the big pain.

The Install Shield Answer files that I create using the record feature appears to be in an INI format. I may be able to just modify a single .iss file to use with each version instead of having to FileInstall each one.

[installShield Silent]Version=v6.00.000

File=Response File

[File Transfer]

OverwrittenReadOnly=NoToAll

[{CA532E73-1BB7-11D8-9D6A-00010240CE95}-DlgOrder]

Dlg0={CA532E73-1BB7-11D8-9D6A-00010240CE95}-SprintfBox-0

Count=2

Dlg1={CA532E73-1BB7-11D8-9D6A-00010240CE95}-SdFinishReboot-0

[{CA532E73-1BB7-11D8-9D6A-00010240CE95}-SprintfBox-0]

Result=1

[Application]

Name=Java 2 Runtime Environment, SE v1.4.1_07

Version=1.4.1_07

Company=JavaSoft

Lang=0009

[{CA532E73-1BB7-11D8-9D6A-00010240CE95}-SdFinishReboot-0]

Result=1

BootOption=0

I am able to read in all versions of Java on a comptuer using Registry entries, and I just use a big Case statement to uninstall each one one at a time. I then write the return code to a log file for viewing later. I think this may only take me 1.5 - 2 days at my current rate.

edit: OK, I just finished installing Every single version of Java on a test comptuer and the versions of java that require the Answer file to be recorded are from v1.3.1_05 to v1.4.1_07 total of 28 versions. All of the others will be simple command line switches to do Silent Uninstalls.

Mike

Edited by MikeOsdx

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0