/build/static/layout/Breadcrumb_cap_w.png

Uninstall older versions of Java.

Hi Guys,

 

I know this question has been going around for quite some time. And I know there are many uninstall vbscripts that can do that. But couple of questions to ask.

1) Is there a script that can uninstall JRE 1.6 along with the files in Program data. As when i try to uninstall using the uninstall string it leaves back some of the registries and files which becomes a problem when qualys is trying to do a report. If it sees anything regarding JRE 6 it raises a flag that says u have a older version of Java.

 

2) Is there any script that does uninstall the older versions of Java and all the files relating to Java. I have tried to embedd a vbscript in the transform of JRE 1.7. It does not do anything. 

 

 

If at all if you guys have a script that uninstalls older version of Java and remove all the files of JRE 6. Can you help me please.

 

 

Thanks a lot in advance.

 

Sid


0 Comments   [ + ] Show comments

Answers (2)

Posted by: areiner 11 years ago
4th Degree Black Belt
1

Quick and dirty:

 

OnErrorResumenext

Dim WshShell 
Dim fso
Set fso = WScript.CreateObject("Scripting.Filesystemobject")
Set WshShell = WScript.CreateObject("Wscript.Shell")

WshShell.Run "msiexec /X{26A24AE4-039D-4CA4-87B4-2F83216029FF} /qb-", 1, True
fso.DeleteFolder("YOUR PATH TO JAVA FOLDERS YOU WANT DELETED"), 1, True
WshShell.Run "regedit /s \\path to reg file\", 1true
WshShell.Run "msiexec /i \\path to java7\ /qb-"
WScript.Quit

be sure to adasdd that "-" infront of the regfiles to be deleted.

[-HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft]


Comments:
  • Hey Ariner,
    That was a good one. But is there any way that we can actually do something like a conditional statement where it checks for the registry and delete it. Since it doing to be used on different machines and we are not really sure what version of Java is not installed on the machine. Over all the script that you gave me is nice. - Sidhugadu 11 years ago
  • Are you able to pull a software inventory of all the versions of java installed? If so you could do an If/then statement for all of those particular folder in Program Files - areiner 11 years ago
  • I do have the inventory of all the versions of JRE. And it is just version 6 that I need to uninstall. But the folder and the registries that I want to delete are the same. But thanks a million Mate. - Sidhugadu 11 years ago
Posted by: SMal.tmcc 11 years ago
Red Belt
1

http://www.itninja.com/blog/view/how-to-create-your-own-uninstall-strings-for-all-versions-of-java-6-and-7


Comments:
  • http://www.itninja.com/link/batch-script-to-list-all-java-product-and-uninstall-keys - SMal.tmcc 11 years ago
  • SMal.tmcc: Thanks a lot for the help mate. But my company doesn't really want me to use batch files. But thanks for the help man. - Sidhugadu 11 years ago
 
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