Java old version uninstall using batch file through SCCM 2007 R2

Hi every one

before asking about this i really tried to solve it from previous posts and i found some many options to check but :( it never worked.

 i am trying to uninstall all Java versions from about 500 PC's using SCCM07 R2 i used .bat file containing:

MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217000FF} /qb /norestart 

for all Java versions

and created a package, used the batch file as a program and created advertise for this package and then liked the advertise to collection, when i add systems to the collection the batch file arrive to cache file in the host machine properly, but nothing happening after that, i tested the batch file from the host machine its accessible and when i run it working fine

so please i need to know what i am missing out in this configurations.

November 6th, 2013 7:38am

In your command-line above, 26A24AE4-039D-4CA4-87B4-2F83217000FF is a product code specific to a single version of Java, not all of them thus unless you only have a single old version on all of your systems, this will probably not do anything on most of them.

Have you reviewed execmgr.log on a targeted client system to see if the program ran and if it ran successfully?

Free Windows Admin Tool Kit Click here and download it now
November 6th, 2013 9:09pm

Why dont you use SCCM uninstaller Exe which will execute the command for you and uninstall if the MSI app is installed if not it willl complete the execution and give exitcode 0
November 6th, 2013 11:19pm

Dear Jason 

thanks for replay 

regarding the command-line its sample i have product code for all Java products,

in Event Viewer there are tow information events as bellow:

(Beginning a Windows Installer transaction: {26A24AE4-039D-4CA4-87B4-2F83217000FF}. Client Process Id: 4576.)

(Ending a Windows Installer transaction: {26A24AE4-039D-4CA4-87B4-2F83217000FF}. Client Process Id: 4576.)

this is what i have in my .bat file exactly:

  

MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217000FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217001FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217002FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217003FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217004FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217005FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217006FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217007FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217008FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217009FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217010FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217011FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217012FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217013FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217014FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217015FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217016FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217017FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217018FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217019FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217020FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217021FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217022FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217023FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217024FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217025FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217026FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217027FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217028FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217029FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217030FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217031FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217032FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217033FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217034FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217035FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217036FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217037FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217038FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217039FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217040FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417000FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417001FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417002FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417003FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417004FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417005FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417006FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417007FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417008FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417009FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417010FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417011FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417012FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417013FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417014FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417015FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417016FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417017FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417018FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417019FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417020FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417021FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417022FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417023FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417024FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417025FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417026FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417027FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417028FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417029FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417030FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417031FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417032FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417033FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417034FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417035FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417036FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417037FF} /qb /norestart
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417040FF} /qb /norestart
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217038FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217039FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216000FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216001FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216002FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216003FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216004FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216005FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216006FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216007FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216008FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216009FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216010FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216011FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216012FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216013FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216014FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216015FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216016FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216017FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216018FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216019FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216020FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216021FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216022FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216023FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216024FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216025FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216026FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216027FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216028FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216029FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216030FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216031FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216032FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216033FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216034FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216035FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216036FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216037FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416000FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416001FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416002FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416003FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416004FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416005FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416006FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416007FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416008FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416009FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416010FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416011FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416012FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416013FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416014FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416015FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416016FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416017FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416018FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416019FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416020FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416021FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416022FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416023FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416024FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416025FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416026FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416027FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416028FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416029FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416030FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416031FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416032FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416033FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416034FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416035FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416036FF} /qb /norestart 
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416037FF} /qb /norestart 
MsiExec.exe /X{3248F0A8-6813-11D6-A77B-00B0D0160070} /qb /norestart 
MsiExec.exe /X{35A3A4F4-B792-11D6-A78A-00B0D0142300} /qb /norestart 
MsiExec.exe /X{32A3A4F4-B792-11D6-A78A-00B0D0160000} /qb /norestart 
MsiExec.exe /X{3248F0A8-6813-11D6-A77B-00B0D0160000} /qb /norestart 
MsiExec.exe /X{7148F0A8-6813-11D6-A77B-00B0D0142300} /qb /norestart 

msiexec /x {26A24AE4-039D-4CA4-87B4-2F83217017FF} /q /norestart
msiexec /x {26A24AE4-039D-4CA4-87B4-2F83216032FF} /q /norestart
msiexec /x {26A24AE4-039D-4CA4-87B4-2F832160070FF} /q /norestart

MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216031FF} /quiet /norestart
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216032FF} /quiet /norestart
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216007FF} /quiet /norestart
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217017FF} /quiet /norestart
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216038FF} /quiet /norestart

so its look like its executing only the firs command-line, what i should add to the .bat file?

Free Windows Admin Tool Kit Click here and download it now
November 7th, 2013 5:37am

Dear Kamala 

i never used this method please can you brief more

ample thanks  

November 7th, 2013 5:39am

Hi Khalid,

Have you tried running the batch file manually on a test machine with Java installed to confirm.

I'm not sure if you have seen this below post. But it has most uninstallation methods. The VB script (by Nithin Sasidharan) seems to be successful based on the comments and votes. Check it on a test machine and  proceed if it is a success.

http://social.technet.microsoft.com/Forums/systemcenter/en-US/48011e95-5057-4981-b9c8-2738cbefad2a/uninstall-java-products-using-sccm?forum=configmgrgeneral

Free Windows Admin Tool Kit Click here and download it now
November 7th, 2013 9:12am

Thanks ucrajee

i tested the batch file manually on test machine and all commands are running successfully but popup message that telling no software for this product code appears for every code till its found the code for the version on the PC, i wish i delivered the conception for you.

and regarding The VB script (by Nithin Sasidharan) i think it will remove all Java version, i need to keep the most newest on witch i'll install it through SCCM.

thanks in advance   

 
November 7th, 2013 9:23am

MsiExec.exe /X normally will not return any error code if the product is not installed. But on your issue, try using vbs script with "If - Else" options.

Found this below link which has a scripts to uninstall all java versions except few mentioned versions. Understand the script and then you may try on a test machine first. Else go with a custom made one.

http://www.itninja.com/question/silent-uninstall-java-all-versions

Free Windows Admin Tool Kit Click here and download it now
November 7th, 2013 4:03pm

try using wmic

http://social.technet.microsoft.com/Forums/windows/en-US/74ff30ca-6e7a-43de-ad4e-ae7e2c1df4e4/uninstalling-software-using-wmic

November 8th, 2013 5:50pm

Thank you all for helping me on this 

i found very useful script and i advertised it through SCCM:

1: Create .bat file (as Bellow)

2: Create a collection (All Java Uninstall)

3: Create a package and in the program choose the .bat file from shared file

4: Create advertisement for the program

5: Add the systems (Computer) required uninstall of Java to the collection

the script in .bat file is flexible, that mean you can add and remove any version of java and its now include all versions till 7u40.

Please check the script before use it it may contain versions you Java users may need.

The script: 

REM Uninstall Java 7 Update 45
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83217045FF} /qn /norestart

REM Uninstall Java 7 Update 45 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86417045FF} /qn /noresta

REM Uninstall Java 7 Update 40
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83217040FF} /qn /norestart

REM Uninstall Java 7 Update 40 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86417040FF} /qn /norestart

REM Uninstall Java 7 Update 25 64 bit
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F86417025FF} /qn /norestart

REM Uninstall Java 7 Update 25
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F83217025FF} /qn /norestart

REM Uninstall Java 7 Update 21 64 bit
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F86417021FF} /qn /norestart

REM Uninstall Java 7 Update 21
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F83217021FF} /qn /norestart

REM Uninstall Java 7 Update 17 64 bit
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F86417017FF} /qn /norestart

REM Uninstall Java 7 Update 17
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F83217017FF} /qn /norestart

REM Uninstall Java 7 Update 16 64 bit
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F86417016FF} /qn /norestart

REM Uninstall Java 7 Update 16
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F83217016FF} /qn /norestart

REM Uninstall Java 7 Update 15 64 bit
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F86417015FF} /qn /norestart

REM Uninstall Java 7 Update 15
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F83217015FF} /qn /norestart

REM Uninstall Java 7 Update 14 64 bit
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F86417014FF} /qn /norestart

REM Uninstall Java 7 Update 14
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F83217014FF} /qn /norestart

REM Uninstall Java 7 Update 13 64 bit
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F86417013FF} /qn /norestart

REM Uninstall Java 7 Update 13
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F83217013FF} /qn /norestart

REM Uninstall Java 7 Update 12 64 bit
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F86417012FF} /qn /norestart

REM Uninstall Java 7 Update 12
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F83217012FF} /qn /norestart

REM Uninstall Java 7 Update 11 64 bit
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F86417011FF} /qn /norestart

REM Uninstall Java 7 Update 11
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F83217011FF} /qn /norestart

REM Uninstall Java 7 Update 10 64 bit
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F86417010FF} /qn /norestart

REM Uninstall Java 7 Update 10
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F83217010FF} /qn /norestart

REM Uninstall Java 7 Update 9 64 bit
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F86417009FF} /qn /norestart

REM Uninstall Java 7 Update 9
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F83217009FF} /qn /norestart

REM Uninstall Java 7 Update 8 64 bit
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F86417008FF} /qn /norestart

REM Uninstall Java 7 Update 8
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F83217008FF} /qn /norestart

REM Uninstall Java 7 Update 7 64 bit
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F86417007FF} /qn /norestart

REM Uninstall Java 7 Update 7
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F83217007FF} /qn /norestart

REM Uninstall Java 7 Update 6
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83217006FF} /qn /norestart

REM Uninstall Java 7 Update 6  - 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86417006FF} /qn /norestart

REM Uninstall Java 7 Update 5
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F83217005FF} /qn /norestart

REM Uninstall Java 7 Update 5  - 64 bit
 msiexec.exe /X {26A24AE4-039D-4CA4-87B4-2F86417005FF} /qn /norestart

REM Uninstall Java 7 Update 4 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86417004FF} /qn /norestart

REM Uninstall Java 7 Update 4
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83217004FF} /qn /norestart

REM Uninstall Java 7 Update 3 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86417003FF} /qn /norestart

REM Uninstall Java 7 Update 3
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83217003FF} /qn /norestart

REM Uninstall Java 7 Update 2 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86417002FF} /qn /norestart

REM Uninstall Java 7 Update 2
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83217002FF} /qn /norestart

REM Uninstall Java 7 Update 1 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86417001FF} /qn /norestart

REM Uninstall Java 7 Update 1
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83217001FF} /qn /norestart

REM Uninstall Java 6 Update 43
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216043FF} /qn /norestart

REM Uninstall Java 6 Update 43 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416043FF} /qn /norestart

REM Uninstall Java 6 Update 42
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216042FF} /qn /norestart

REM Uninstall Java 6 Update 42 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416042FF} /qn /norestart

REM Uninstall Java 6 Update 41
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216041FF} /qn /norestart

REM Uninstall Java 6 Update 41 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416041FF} /qn /norestart

REM Uninstall Java 6 Update 40
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216040FF} /qn /norestart

REM Uninstall Java 6 Update 40 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416040FF} /qn /norestart

REM Uninstall Java 6 Update 39
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216039FF} /qn /norestart

REM Uninstall Java 6 Update 39 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416039FF} /qn /norestart

REM Uninstall Java 6 Update 38
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216038FF} /qn /norestart

REM Uninstall Java 6 Update 38 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416038FF} /qn /norestart

REM Uninstall Java 6 Update 37
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216037FF} /qn /norestart

REM Uninstall Java 6 Update 37 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416037FF} /qn /norestart

REM Uninstall Java 6 Update 36
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216036FF} /qn /norestart

REM Uninstall Java 6 Update 36 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416036FF} /qn /norestart

REM Uninstall Java 6 Update 35
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216035FF} /qn /norestart

REM Uninstall Java 6 Update 35 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416035FF} /qn /norestart

REM Uninstall Java 6 Update 34
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216034FF} /qn /norestart

REM Uninstall Java 6 Update 34 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416034FF} /qn /norestart

REM Uninstall Java 6 Update 33
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216033FF} /qn /norestart

REM Uninstall Java 6 Update 33 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416033FF} /qn /norestart

REM Uninstall Java 6 Update 32
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216032FF} /qn /norestart

REM Uninstall Java 6 Update 32 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416032FF} /qn /norestart

REM Uninstall Java 6 Update 31 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416031FF} /qn /norestart

REM Uninstall Java 6 Update 31
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216031FF} /qn /norestart

REM Uninstall Java 6 Update 30 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416030FF} /qn /norestart

REM Uninstall Java 6 Update 30
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216030FF} /qn /norestart

REM Uninstall Java 6 Update 29 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416029FF} /qn /norestart

REM Uninstall Java 6 Update 29
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216029FF} /qn /norestart

REM Uninstall Java 6 Update 28 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416028FF} /qn /norestart

REM Uninstall Java 6 Update 28
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216028FF} /qn /norestart

REM Uninstall Java 6 Update 27 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416027FF} /qn /norestart

REM Uninstall Java 6 Update 27
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216027FF} /qn /norestart

REM Uninstall Java 6 Update 26 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416026FF} /qn /norestart

REM Uninstall Java 6 Update 26
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216026FF} /qn /norestart

REM Uninstall Java 6 Update 25 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416025FF} /qn /norestart

REM Uninstall Java 6 Update 25
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216025FF} /qn /norestart

REM Uninstall Java 6 Update 24 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416024FF} /qn /norestart

REM Uninstall Java 6 Update 24
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216024FF} /qn /norestart

REM Uninstall Java 6 Update 23 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416023FF} /qn /norestart

REM Uninstall Java 6 Update 23
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216023FF} /qn /norestart

REM Uninstall Java 6 Update 22
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216022FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160220} /qn /norestart

REM Uninstall Java 6 Update 21
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216021FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160210} /qn /norestart

REM Uninstall Java 6 Update 20
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216020FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160200} /qn /norestart

REM Uninstall Java 6 Update 19
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216019FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160190} /qn /norestart

REM Uninstall Java 6 Update 18
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216018FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160180} /qn /norestart

REM Uninstall Java 6 Update 17
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216017FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160170} /qn /norestart

REM Uninstall Java 6 Update 16
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216016FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160160} /qn /norestart

REM Uninstall Java 6 Update 15
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216015FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160150} /qn /norestart

REM Uninstall Java 6 Update 14
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216014FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160140} /qn /norestart

REM Uninstall Java 6 Update 13
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216013FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160130} /qn /norestart

REM Uninstall Java 6 Update 12
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216012FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160120} /qn /norestart

REM Uninstall Java 6 Update 11
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216011FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160110} /qn /norestart

REM Uninstall Java 6 Update 10
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216010FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160100} /qn /norestart

REM Uninstall Java 6 Update 09
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216009FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160090} /qn /norestart

REM Uninstall Java 6 Update 08
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216008FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160080} /qn /norestart

REM Uninstall Java 6 Update 07
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216007FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160070} /qn /norestart

REM Uninstall Java 6 Update 06
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216006FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160060} /qn /norestart

REM Uninstall Java 6 Update 05
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216005FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160050} /qn /norestart

REM Uninstall Java 6 Update 04
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216004FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160040} /qn /norestart

REM Uninstall Java 6 Update 03
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216003FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160030} /qn /norestart

REM Uninstall Java 6 Update 02
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216002FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160020} /qn /norestart

REM Uninstall Java 6 Update 01
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216001FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160010} /qn /norestart

REM Uninstall Java 6
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216000FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160000} /qn /norestart

REM Uninstall Java 5.0
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150000} /qn /norestart

REM Uninstall Java 5.0 Update 1
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150010} /qn /norestart

REM Uninstall Java 5.0 Update 2
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150020} /qn /norestart

REM Uninstall Java 5.0 Update 3
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150030} /qn /norestart

REM Uninstall Java 5.0 Update 4
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150040} /qn /norestart

REM Uninstall Java 5.0 Update 5
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150050} /qn /norestart

REM Uninstall Java 5.0 Update 6
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150060} /qn /norestart

REM Uninstall Java 5.0 Update 7
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150070} /qn /norestart

REM Uninstall Java 5.0 Update 8
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150080} /qn /norestart

REM Uninstall 5.0 Java Update 9
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150090} /qn /norestart

REM Uninstall Java 5.0 Update 10
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150100} /qn /norestart

REM Uninstall Java 5.0 Update 11
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150110} /qn /norestart

REM Uninstall Java 5.0 Update 12
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150120} /qn /norestart

REM Uninstall Java 5.0 Update 13
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150130} /qn /norestart

REM Uninstall Java 5.0 Update 14
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150140} /qn /norestart

REM Uninstall Java 5.0 Update 15
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150150} /qn /norestart

REM Uninstall Java 5.0 Update 16
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150160} /qn /norestart

REM Uninstall Java 5.0 Update 17
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150170} /qn /norestart

REM Uninstall Java 5.0 Update 18
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150180} /qn /norestart

REM Uninstall Java 5.0 Update 19
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150190} /qn /norestart

REM Uninstall Java 5.0 Update 20
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150200} /qn /norestart

REM Uninstall Java 5.0 Update 21
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150210} /qn /norestart

REM Uninstall Java 5.0 Update 22
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150220} /qn /norestart

REM Uninstall Java 5.0 Update 23
 MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0150230} /qn /norestart

REM Uninstall Java 1.4.2
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142000} /qn /norestart

REM Uninstall Java 1.4.2_01
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142010} /qn /norestart

REM Uninstall Java 1.4.2_02
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142020} /qn /norestart

REM Uninstall Java 1.4.2_03
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142030} /qn /norestart

REM Uninstall Java 1.4.2_04
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142040} /qn /norestart

REM Uninstall Java 1.4.2_05
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142050} /qn /norestart

REM Uninstall Java 1.4.2_106
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142060} /qn /norestart

REM Uninstall Java 1.4.2_07
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142070} /qn /norestart

REM Uninstall Java 1.4.2_08
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142080} /qn /norestart

REM Uninstall Java 1.4.2_09
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142090} /qn /norestart

REM Uninstall Java 1.4.2_10
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142100} /qn /norestart

REM Uninstall Java 1.4.2_11
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142110} /qn /norestart

REM Uninstall Java 1.4.2_12
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142120} /qn /norestart

REM Uninstall Java 1.4.2_13
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142130} /qn /norestart

REM Uninstall Java 1.4.2_14
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142140} /qn /norestart

REM Uninstall Java 1.4.2_15
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142150} /qn /norestart

REM Uninstall Java 1.4.2_16
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142160} /qn /norestart

REM Uninstall Java 1.4.2_17
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142170} /qn /norestart

REM Uninstall Java 1.4.2_18
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142180} /qn /norestart

REM Uninstall Java 1.4.2_19
 MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142190} /qn /norestart

REM Uninstall Java(TM) 6 Update 29
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216029FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 29 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416029FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 32 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416032FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 32
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216032FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 7 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416007FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 7
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216007FF} /qn /norestart


REM Uninstall Java(TM) 6 Update 43
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216043FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 43 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416043FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 42
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216042FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 42 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416042FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 41
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216041FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 41 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416041FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 40
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216040FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 40 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416040FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 39
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216039FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 39 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416039FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 38
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216038FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 38 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416038FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 37
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216037FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 37 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416037FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 36
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216036FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 36 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416036FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 35
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216035FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 35 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416035FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 34
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216034FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 34 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416034FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 33
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216033FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 33 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416033FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 32
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216032FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 32 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416032FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 31 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416031FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 31
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216031FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 30 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416030FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 30
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216030FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 29 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416029FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 29
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216029FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 28 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416028FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 28
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216028FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 27 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416027FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 27
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216027FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 26 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416026FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 26
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216026FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 25 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416025FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 25
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216025FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 24 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416024FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 24
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216024FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 23 64 bit
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416023FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 23
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216023FF} /qn /norestart

REM Uninstall Java(TM) 6 Update 22
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216022FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160220} /qn /norestart

REM Uninstall Java(TM) 6 Update 21
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216021FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160210} /qn /norestart

REM Uninstall Java(TM) 6 Update 20
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216020FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160200} /qn /norestart

REM Uninstall Java(TM) 6 Update 19
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216019FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160190} /qn /norestart

REM Uninstall Java(TM) 6 Update 18
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216018FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160180} /qn /norestart

REM Uninstall Java(TM) 6 Update 17
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216017FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160170} /qn /norestart

REM Uninstall Java(TM) 6 Update 16
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216016FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160160} /qn /norestart

REM Uninstall Java(TM) 6 Update 15
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216015FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160150} /qn /norestart

REM Uninstall Java(TM) 6 Update 14
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216014FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160140} /qn /norestart

REM Uninstall Java(TM) 6 Update 13
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216013FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160130} /qn /norestart

REM Uninstall Java(TM) 6 Update 12
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216012FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160120} /qn /norestart

REM Uninstall Java(TM) 6 Update 11
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216011FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160110} /qn /norestart

REM Uninstall Java(TM) 6 Update 10
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216010FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160100} /qn /norestart

REM Uninstall Java(TM) 6 Update 09
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216009FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160090} /qn /norestart

REM Uninstall Java(TM) 6 Update 08
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216008FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160080} /qn /norestart

REM Uninstall Java(TM) 6 Update 07
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216007FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160070} /qn /norestart

REM Uninstall Java(TM) 6 Update 06
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216006FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160060} /qn /norestart

REM Uninstall Java(TM) 6 Update 05
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216005FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160050} /qn /norestart

REM Uninstall Java(TM) 6 Update 04
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216004FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160040} /qn /norestart

REM Uninstall Java(TM) 6 Update 03
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216003FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160030} /qn /norestart

REM Uninstall Java(TM) 6 Update 02
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216002FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160020} /qn /norestart

REM Uninstall Java(TM) 6 Update 01
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216001FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160010} /qn /norestart

REM Uninstall Java(TM) 6
 msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216000FF} /qn /norestart
 msiexec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160000} /qn /norestart



REM Uninstall Java 2 SDK, SE v1.4.2_30
MsiExec.exe /X{35A3A4F4-B792-11D6-A78A-00B0D0142300} /qb /norestart 

REM Uninstall Java(TM) SE Development Kit6
MsiExec.exe /X{32A3A4F4-B792-11D6-A78A-00B0D0160000} /qb /norestart 

REM Uninstall Java(TM) SE Runtime Environment 6
MsiExec.exe /X{3248F0A8-6813-11D6-A77B-00B0D0160000} /qb /norestart 

REM Uninstall Java 2 Runtime Environment, SE v1.4.2_30
MsiExec.exe /X{7148F0A8-6813-11D6-A77B-00B0D0142300} /qb /norestart 
  
Free Windows Admin Tool Kit Click here and download it now
November 10th, 2013 7:38am

This is awesome! We finally updated one of our old applications that depended on an older version of Java 6 and now we can update all computers to the latest version of Java 7, however I wasn't sure how I was going to go about removing the various versions of Java that are installed on all of our computers. I was thinking I might have to actually go to each machine and remove Java one by one which of course would have taken FOREVER. This will save me a ton of time, thanks so much Khalid and everyone else that helped put this together.
November 21st, 2013 12:32pm

I have created a software package and advertised it to a test group of computers and it does successfully remove all versions of Java however SCCM reports that the "install" failed. I'm assuming it's from the return codes given on versions that the batch file tries to remove but are not installed, am I on the right track? Any ideas on what else could cause it to show as failed?
Free Windows Admin Tool Kit Click here and download it now
November 22nd, 2013 3:32pm

If you are using a package/program to distribute the script, check execmgr.log on the client to see exactly what's going on and what error code is being returned.
November 22nd, 2013 9:24pm

I think I have a better solution than anyone has ever came up with.  I am not good at writing or explaining my logic, but trust me my code is good.

I use a batch file to uninstall all versions of Java before installing the latest version OF THAT SAME ARCHITECTURE. So for 64 bit installs of Java, I will remove all previous 64 bit installs - heres how.

I use a batch file to look at the registry and find any iteration of Java 8, then parse the registry key and run the uninstaller. then do the same thing for 7, 6 and beyond ("Java TM") which was used in the java 5 and older days.

Also my code will remove the folder structure, and the locations in windows that the JRE biniaries are sometimes copied.  Lets get to it...

NOTE, line wrapping in this forum will make the code below look all Foobar... copy and paste it, it should paste just fine.

CODE:

::JavaUninstall32Bit.bat

for /f "tokens=8 delims=\" %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 8" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=8 delims=\" %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 7" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=8 delims=\" %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 6" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=8 delims=\" %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java(TM)" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS

for /f  %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 8" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 7" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 6" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java(TM)" ^| findstr "HKEY"') do call :RegDel %%a /f
rmdir "C:\Program Files (x86)\Java\jre6" /s /q
rmdir "C:\Program Files (x86)\Java\jre7" /s /q
::This will prevent the system mistaking 64 bit versions of Java as 32 bit versions on 32 bit operating systems.
IF %PROCESSOR_ARCHITECTURE%==AMD64 goto :Skip64Uninstall

for /f "tokens=7 delims=\" %%a in ('reg query hklm\software\microsoft\windows\currentversion\uninstall /s /f "Java 8" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=7 delims=\" %%a in ('reg query hklm\software\microsoft\windows\currentversion\uninstall /s /f "Java 7" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=7 delims=\" %%a in ('reg query hklm\software\Microsoft\windows\currentversion\uninstall /s /f "Java 6" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=7 delims=\" %%a in ('reg query hklm\software\Microsoft\windows\currentversion\uninstall /s /f "Java(TM)" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS

for /f  %%a in ('reg query hklm\software\microsoft\windows\currentversion\uninstall /s /f "Java 8" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\microsoft\windows\currentversion\uninstall /s /f "Java 7" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\microsoft\windows\currentversion\uninstall /s /f "Java 6" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\Microsoft\windows\currentversion\uninstall /s /f "Java(TM)" ^| findstr "HKEY"') do call :RegDel %%a /f
rmdir "C:\Program Files\Java\jre6" /s /q
rmdir "C:\Program Files\Java\jre7" /s /q
exit 0
:skip64Uninstall




  • Proposed as answer by SCCM_Scout 17 hours 16 minutes ago
  • Edited by SCCM_Scout 17 hours 15 minutes ago grammar issues..
Free Windows Admin Tool Kit Click here and download it now
July 23rd, 2015 10:22am

You can, by using the logic I just posted develop a batch file for 64bit. I would first ensure that script is only running on 64 bit machines, and have your script CHECK to ensure its on a 64bit machine by checking the Environmental Variable %PROCESSOR_ARCHITECTURE%

I would exit with a specific error code for your reporting.

July 23rd, 2015 10:33am

I think I have a better solution than anyone has ever came up with.  I am not good at writing or explaining my logic, but trust me my code is good.

I use a batch file to uninstall all versions of Java before installing the latest version OF THAT SAME ARCHITECTURE. So for 64 bit installs of Java, I will remove all previous 64 bit installs - heres how.

I use a batch file to look at the registry and find any iteration of Java 8, then parse the registry key and run the uninstaller. then do the same thing for 7, 6 and beyond ("Java TM") which was used in the java 5 and older days.

Also my code will remove the folder structure, and the locations in windows that the JRE biniaries are sometimes copied.  Lets get to it...

NOTE, line wrapping in this forum will make the code below look all Foobar... copy and paste it, it should paste just fine.

CODE:

::JavaUninstall32Bit.bat

for /f "tokens=8 delims=\" %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 8" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=8 delims=\" %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 7" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=8 delims=\" %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 6" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=8 delims=\" %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java(TM)" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS

for /f  %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 8" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 7" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 6" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java(TM)" ^| findstr "HKEY"') do call :RegDel %%a /f
rmdir "C:\Program Files (x86)\Java\jre6" /s /q
rmdir "C:\Program Files (x86)\Java\jre7" /s /q
::This will prevent the system mistaking 64 bit versions of Java as 32 bit versions on 32 bit operating systems.
IF %PROCESSOR_ARCHITECTURE%==AMD64 goto :Skip64Uninstall

for /f "tokens=7 delims=\" %%a in ('reg query hklm\software\microsoft\windows\currentversion\uninstall /s /f "Java 8" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=7 delims=\" %%a in ('reg query hklm\software\microsoft\windows\currentversion\uninstall /s /f "Java 7" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=7 delims=\" %%a in ('reg query hklm\software\Microsoft\windows\currentversion\uninstall /s /f "Java 6" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=7 delims=\" %%a in ('reg query hklm\software\Microsoft\windows\currentversion\uninstall /s /f "Java(TM)" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS

for /f  %%a in ('reg query hklm\software\microsoft\windows\currentversion\uninstall /s /f "Java 8" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\microsoft\windows\currentversion\uninstall /s /f "Java 7" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\microsoft\windows\currentversion\uninstall /s /f "Java 6" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\Microsoft\windows\currentversion\uninstall /s /f "Java(TM)" ^| findstr "HKEY"') do call :RegDel %%a /f
rmdir "C:\Program Files\Java\jre6" /s /q
rmdir "C:\Program Files\Java\jre7" /s /q
exit 0
:skip64Uninstall




  • Proposed as answer by SCCM_Scout Thursday, July 23, 2015 2:23 PM
  • Edited by SCCM_Scout Thursday, July 23, 2015 2:25 PM grammar issues..
Free Windows Admin Tool Kit Click here and download it now
July 23rd, 2015 2:19pm

I think I have a better solution than anyone has ever came up with.  I am not good at writing or explaining my logic, but trust me my code is good.

I use a batch file to uninstall all versions of Java before installing the latest version OF THAT SAME ARCHITECTURE. So for 64 bit installs of Java, I will remove all previous 64 bit installs - heres how.

I use a batch file to look at the registry and find any iteration of Java 8, then parse the registry key and run the uninstaller. then do the same thing for 7, 6 and beyond ("Java TM") which was used in the java 5 and older days.

Also my code will remove the folder structure, and the locations in windows that the JRE biniaries are sometimes copied.  Lets get to it...

NOTE, line wrapping in this forum will make the code below look all Foobar... copy and paste it, it should paste just fine.

CODE:

::JavaUninstall32Bit.bat

for /f "tokens=8 delims=\" %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 8" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=8 delims=\" %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 7" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=8 delims=\" %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 6" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=8 delims=\" %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java(TM)" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS

for /f  %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 8" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 7" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java 6" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\wow6432node\microsoft\windows\currentversion\uninstall /s /f "Java(TM)" ^| findstr "HKEY"') do call :RegDel %%a /f
rmdir "C:\Program Files (x86)\Java\jre6" /s /q
rmdir "C:\Program Files (x86)\Java\jre7" /s /q
::This will prevent the system mistaking 64 bit versions of Java as 32 bit versions on 32 bit operating systems.
IF %PROCESSOR_ARCHITECTURE%==AMD64 goto :Skip64Uninstall

for /f "tokens=7 delims=\" %%a in ('reg query hklm\software\microsoft\windows\currentversion\uninstall /s /f "Java 8" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=7 delims=\" %%a in ('reg query hklm\software\microsoft\windows\currentversion\uninstall /s /f "Java 7" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=7 delims=\" %%a in ('reg query hklm\software\Microsoft\windows\currentversion\uninstall /s /f "Java 6" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS
for /f "tokens=7 delims=\" %%a in ('reg query hklm\software\Microsoft\windows\currentversion\uninstall /s /f "Java(TM)" ^| findstr "HKEY"') do msiexec /x%%a /q REBOOT=REALLYSUPPRESS

for /f  %%a in ('reg query hklm\software\microsoft\windows\currentversion\uninstall /s /f "Java 8" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\microsoft\windows\currentversion\uninstall /s /f "Java 7" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\microsoft\windows\currentversion\uninstall /s /f "Java 6" ^| findstr "HKEY"') do call :RegDel %%a /f
for /f  %%a in ('reg query hklm\software\Microsoft\windows\currentversion\uninstall /s /f "Java(TM)" ^| findstr "HKEY"') do call :RegDel %%a /f
rmdir "C:\Program Files\Java\jre6" /s /q
rmdir "C:\Program Files\Java\jre7" /s /q
exit 0
:skip64Uninstall




  • Proposed as answer by SCCM_Scout Thursday, July 23, 2015 2:23 PM
  • Edited by SCCM_Scout Thursday, July 23, 2015 2:25 PM grammar issues..
July 23rd, 2015 2:19pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics