/build/static/layout/Breadcrumb_cap_w.png

Ultimate Java Uninstaller

Howdy Guys,
Here is a Script I wrote to uninstall many versions of Oracle (previously Sun) Java.
I'm a Scripting Newbie (2nd Script ever), but this compilation is working for me so I thought I would share.

Verions 1.3 - 1.4 are only JRE's (no SDK's), Versions 1.5 - 1.6 are JRE's and JDK's.
I could not get JRE version 1.6 updates 7 & 8 so I did'nt include any assumed keys for them, I did however include the uninstall Key's for JDK version 1.6 updates 7 & 8, seeing as though they probably followed the same pattern.

I've only tested this script on a few versions of 1.5 and 1.6 and it has worked on all that I tested, but that doesnt necessarily mean this script is without error or fault; im sure it could be improved on.

There are probably other scripts "out there" to uninstall multiple versions of Java, and they probably work as good or better then the one I have created. but being new to scripting and not really understanding any other Programming Languages yet this makes the most sence to me.

Last note, script had to be run as an Administrator, pushed through SCCM, or PSexec'd for it to work for me.

Thanks and I hope this can help someone.,
Kevin



@echo off
color 04
title Ultimate Java Destroyer
rem *************************
rem Created by Kevin S.
rem Last Modified on 1/25/2011
rem *************************
rem Script:JavaUninstall.cmd
rem Use:Uninstalls Java versions 1.3.1_5 - 1.6.0_22
rem *************************
rem Notes:Most all versions of java that can be uninstalled using msiexec.

REM Remove previous versions of Java
@rem 1.3.1_5
@rem 1.3.1_6
@rem 1.3.1_7
@rem 1.3.1_8
@rem 1.3.1_9
@rem 1.3.1_10
@rem 1.3.1_11
@rem 1.3.1_12
@rem 1.3.1_13
@rem 1.3.1_14
@rem 1.3.1_15
@rem 1.3.1_16
@rem 1.3.1_17
@rem 1.3.1_18
@rem 1.3.1_19
@rem 1.3.1_20
msiexec /x {C7B15526-3E6B-11D6-8EF3-00065B663C82} /qn
msiexec /x {D2BFDD8E-D276-11D6-88AF-0050DA21757E} /qn
msiexec /x {0E65518E-EC48-11D6-88B8-0050DA21757E} /qn
msiexec /x {B11CAD0E-0E0F-11D7-88BE-0050DA21757E} /qn
msiexec /x {70F80C1E-5F26-11D7-88D1-0050DA21757E} /qn
msiexec /x {68249B6E-B714-11D7-88E8-0050DA21757E} /qn
msiexec /x {68249B71-B714-11D7-88E8-0050DA21757E} /qn
msiexec /x {68249B72-B714-11D7-88E8-0050DA21757E} /qn
msiexec /x {68249B73-B714-11D7-88E8-0050DA21757E} /qn
msiexec /x {68249B74-B714-11D7-88E8-0050DA21757E} /qn
msiexec /x {68249B75-B714-11D7-88E8-0050DA21757E} /qn
msiexec /x {68249B76-B714-11D7-88E8-0050DA21757E} /qn
msiexec /x {68249B77-B714-11D7-88E8-0050DA21757E} /qn
msiexec /x {68249B78-B714-11D7-88E8-0050DA21757E} /qn
msiexec /x {68249B7A-B714-11D7-88E8-0050DA21757E} /qn
msiexec /x {68249B7B-B714-11D7-88E8-0050DA21757E} /qn

@rem 1.4.0_0
@rem 1.4.0_1
@rem 1.4.0_2
@rem 1.4.0_3
@rem 1.4.0_4
msiexec /x {F4588301-0A06-11D6-A761-00B0D079AF64} /qn
msiexec /x {7CF31609-270B-11D6-9445-000102308676} /qn
msiexec /x {082F1B07-797C-11D6-9CFB-00010240CE95} /qn
msiexec /x {AC1E4C93-C1E7-11D6-9D10-00010240CE95} /qn
msiexec /x {8B12D5A1-E544-11D6-9D1C-00010240CE95} /qn

@rem 1.4.1_0
@rem 1.4.1_1
@rem 1.4.1_2
@rem 1.4.1_3
@rem 1.4.1_4
@rem 1.4.1_5
@rem 1.4.1_6
@rem 1.4.1_7
msiexec /x {CD0159C9-17FB-11D6-A76A-00B0D079AF64} /qn
msiexec /x {1666FA7C-CB5F-11D6-A78C-00B0D079AF64} /qn
msiexec /x {EFCE5837-FC21-11D6-9D24-00010240CE95} /qn
msiexec /x {C4B03AEB-33D3-11D7-9D37-00010240CE95} /qn
msiexec /x {ACD27BF3-7CDC-11D7-9D4D-00010240CE95} /qn
msiexec /x {78D082B3-ACEE-11D7-9D64-00010240CE95} /qn
msiexec /x {6B2F032F-CC54-11D7-9D67-00010240CE95} /qn
msiexec /x {CA532E73-1BB7-11D8-9D6A-00010240CE95} /qn

@rem 1.4.2_0
@rem 1.4.2_1
@rem 1.4.2_2
@rem 1.4.2_3
@rem 1.4.2_4
@rem 1.4.2_5
@rem 1.4.2_6
@rem 1.4.2_7
@rem 1.4.2_8
@rem 1.4.2_9
@rem 1.4.2_10
@rem 1.4.2_11
@rem 1.4.2_12
@rem 1.4.2_13
@rem 1.4.2_14
@rem 1.4.2_15
@rem 1.4.2_16
@rem 1.4.2_17
@rem 1.4.2_18
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142000} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142010} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142020} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142030} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142040} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142050} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142060} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142070} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142080} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142090} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142100} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142110} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142120} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142130} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142140} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142150} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142160} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142170} /qn
msiexec /x {7148F0A8-6813-11D6-A77B-00B0D0142180} /qn

@rem 1.5.0_0 jdk
@rem 1.5.0_1 jdk
@rem 1.5.0_2 jdk
@rem 1.5.0_3 jdk
@rem 1.5.0_4 jdk
@rem 1.5.0_5 jdk
@rem 1.5.0_6 jdk
@rem 1.5.0_7 jdk
@rem 1.5.0_8 jdk
@rem 1.5.0_9 jdk
@rem 1.5.0_10 jdk
@rem 1.5.0_11 jdk
@rem 1.5.0_12 jdk
@rem 1.5.0_13 jdk
@rem 1.5.0_14 jdk
@rem 1.5.0_15 jdk
@rem 1.5.0_16 jdk
@rem 1.5.0_17 jdk
@rem 1.5.0_18 jdk
@rem 1.5.0_19 jdk
@rem 1.5.0_20 jdk
@rem 1.5.0_21 jdk
@rem 1.5.0_22 jdk
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150000} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150010} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150020} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150030} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150040} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150050} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150060} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150070} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150080} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150090} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150100} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150110} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150120} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150130} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150140} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150150} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150160} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150170} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150180} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150190} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150200} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150210} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0150220} /qn

@rem 1.5.0_0 jre
@rem 1.5.0_1 jre
@rem 1.5.0_2 jre
@rem 1.5.0_3 jre
@rem 1.5.0_4 jre
@rem 1.5.0_5 jre
@rem 1.5.0_6 jre
@rem 1.5.0_7 jre
@rem 1.5.0_8 jre
@rem 1.5.0_9 jre
@rem 1.5.0_10 jre
@rem 1.5.0_11 jre
@rem 1.5.0_12 jre
@rem 1.5.0_13 jre
@rem 1.5.0_14 jre
@rem 1.5.0_15 jre
@rem 1.5.0_16 jre
@rem 1.5.0_17 jre
@rem 1.5.0_18 jre
@rem 1.5.0_19 jre
@rem 1.5.0_20 jre
@rem 1.5.0_21 jre
@rem 1.5.0_22 jre
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150000} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150010} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150020} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150030} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150040} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150050} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150060} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150070} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150080} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150090} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150100} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150110} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150120} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150130} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150140} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150150} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150160} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150170} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150180} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150190} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150200} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150210} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150220} /qn

@rem 1.6.0_0 JDK
@rem 1.6.0_1 JDK
@rem 1.6.0_2 JDK
@rem 1.6.0_3 JDK
@rem 1.6.0_4 JDK
@rem 1.6.0_5 JDK
@rem 1.6.0_6 JDK
@rem 1.6.0_7 JDK
@rem 1.6.0_8 JDK
@rem 1.6.0_9 JDK
@rem 1.6.0_10 JDK
@rem 1.6.0_11 JDK
@rem 1.6.0_12 JDK
@rem 1.6.0_13 JDK
@rem 1.6.0_14 JDK
@rem 1.6.0_15 JDK
@rem 1.6.0_17 JDK
@rem 1.6.0_18 JDK
@rem 1.6.0_19 JDK
@rem 1.6.0_20 JDK
@rem 1.6.0_21 JDK
@rem 1.6.0_22 JDK
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160000} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160010} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160020} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160030} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160040} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160050} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160060} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160070} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160080} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160090} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160100} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160110} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160120} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160130} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160140} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160150} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160170} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160180} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160190} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160200} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160210} /qn
msiexec /x {32A3A4F4-B792-11D6-A78A-00B0D0160220} /qn

@rem 1.6.0_0 JRE
@rem 1.6.0_1 JRE
@rem 1.6.0_2 JRE
@rem 1.6.0_3 JRE
@rem 1.6.0_4 JRE
@rem 1.6.0_5 JRE
@rem 1.6.0_6 JRE
@rem 1.6.0_7 JRE
@rem 1.6.0_10 JRE
@rem 1.6.0_11 JRE
@rem 1.6.0_12 JRE
@rem 1.6.0_13 JRE
@rem 1.6.0_14 JRE
@rem 1.6.0_15 JRE
@rem 1.6.0_16 JRE
@rem 1.6.0_17 JRE
@rem 1.6.0_18 JRE
@rem 1.6.0_19 JRE
@rem 1.6.0_20 JRE
@rem 1.6.0_21 JRE
@rem 1.6.0_22 JRE
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160000} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160010} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160020} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160030} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160040} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160050} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160060} /qn
msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160070} /qn
msiexec /x {26A24AE4-039D-4CA4-87B4-2F83216010FF} /qn
msiexec /x {26A24AE4-039D-4CA4-87B4-2F83216011FF} /qn
msiexec /x {26A24AE4-039D-4CA4-87B4-2F83216012FF} /qn
msiexec /x {26A24AE4-039D-4CA4-87B4-2F83216013FF} /qn
msiexec /x {26A24AE4-039D-4CA4-87B4-2F83216014FF} /qn
msiexec /x {26A24AE4-039D-4CA4-87B4-2F83216015FF} /qn
msiexec /x {26A24AE4-039D-4CA4-87B4-2F83216016FF} /qn
msiexec /x {26A24AE4-039D-4CA4-87B4-2F83216017FF} /qn
msiexec /x {26A24AE4-039D-4CA4-87B4-2F83216018FF} /qn
msiexec /x {26A24AE4-039D-4CA4-87B4-2F83216019FF} /qn
msiexec /x {26A24AE4-039D-4CA4-87B4-2F83216020FF} /qn
msiexec /x {26A24AE4-039D-4CA4-87B4-2F83216021FF} /qn
msiexec /x {26A24AE4-039D-4CA4-87B4-2F83216022FF} /qn
exit

0 Comments   [ + ] Show comments

Answers (5)

Posted by: anonymous_9363 13 years ago
Red Belt
0
Nice, but could you please add the CODE tags and remember to use them when posting text of any great length?

Thank you! :-)
Posted by: Strudel 13 years ago
Senior Yellow Belt
0
VBScab,
Thanks for the help, I didnt know about the code tags but after looking for 2 seconds in the edit message window I found them, my post looks much better now.

Thanks again,
Kevin
Posted by: geekydee 13 years ago
Yellow Belt
0
Strudel,

Thank you for the script, I will look at it later and test it. Now I just need to get off my duff and figure out how to code myself :P
I am a little afraid of the previous poster (well, maybe there is a little awe in there, too) and raising his ire :( I am working on a script to copy a file to every profile but am a little stumped. I figure I will just play with it some more until it works or ask someone for help. I guess a little knowledge is a dangerous thing...

Diana
Posted by: swpackager 13 years ago
Senior Yellow Belt
0
:(  I am working on a script to copy a file to every profile but am a little stumped.  I figure I will just play with it some more until it works or ask someone for help. 


I wrote this script for copying a file to all the profiles listed under (C:\Docs& Settings\....) it might help you. save it as .vbs


'
'----------------------------------------------------------------------------------------------------

CONST tempfolder = "C:\Temp\Test\xxxxx.file"
CONST startfolder = "\Start Menu\Programs\xxxxx"

Const startmenu ="\Start Menu\Programs"

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("C:\Documents and Settings")
Set files = objFolder.Files
Set folders = objfolder.subfolders

'-----------------------------------------------------------------------------------------------------

For Each subfol in folders
sFolderName = subfol.name
sFolder = subfol.Path & startfolder
sStart = subfol.Path & startmenu

If sFolderName = "Administrator" or sFolderName = "LocalService" or sFolderName = "NetworkService" Then
Else
If objFSO.FolderExists(sStart) Then
Call writeShortcuts(sFolder)
End if
End if

Next

set files = nothing
set objFolder = nothing
set objFSO = Nothing

'----------------------------------------------------------------------------------------------------------

Function writeShortcuts(sFolderName)

If NOT objFSO.FolderExists(sFolderName) Then
Set newfolder = objFSO.CreateFolder(sFolderName)
End If
objFSO.copyFolder tempfolder,sFolderName,TRUE

End Function
Posted by: anonymous_9363 13 years ago
Red Belt
0
I am working on a script to copy a file to every profile Use Active Setup instead. MUCH simpler!
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ