Java uninstall vbs
Once you download it, just run the application. Just click on the Next button. The most important part of this program is Step 2.
Here you want to click the Perform Removal Routine button, which will remove any leftover files, folders and Java registry entries. Even after uninstalling Java using its own tools, JavaRa was able to remove 12 more items that were left behind. Unless you want to reinstall Java, just click Next and then click Finish on the next screen.
Now Java is completely removed from your Windows system. On Macs, everything is pretty much the same, except for the uninstall process. You can see whether Java is installed on your Mac in pretty much the same way as Windows.
Just open up System Preferences and check to see if there is a Java icon at the bottom. Also, just as in Windows, you can choose to keep Java installed, but disable it in Safari if you like. The first way is to click on the Java icon in System Preferences, which will open the Java Control Panel , which looks exactly like the one in Windows.
Click on the Security tab and then uncheck the Enable Java content in browser box. The other way is to disable Java in Safari directly. To do that, open Safari and then go to Preferences. Click on the Security tab and then click on the Plug-in Settings button at the very bottom next to Internet plug-ins. You should see Java in the list and unchecking the box will disable Java in Safari. First, open up the Terminal by clicking on Spotlight and typing in Terminal or by going to Applications — Utilities and then Terminal.
Now copy and paste in the following commands one at a time and press Enter after pasting each command. When you press enter, you will be asked to enter your administrator password. If you go and check in System Preferences, the Java icon should be gone.
Also, if you go to the plugins section in Safari, it will also be gone from the list of installed plugins. If you have any questions, feel free to post a comment.
I have customers ask me sometimes how application supersedence works and one of the more common questions that I get around supersedence is customers who want to move up to a new major version of Java runtime environment. I don't use this product but a more specific filter would be useful. Thanks for the hint! I tried it and it works. I changed it in the code. Posted by: keyrage 8 years ago. Comments: UPDATE: New and improved version now written as a full module with switches to either specify a version to leave installed or to test the result without uninstalling anything.
Posted by: gpalau 6 years ago. My way of uninstalling Java is not the prettiest, but it works solid, here is my take on it:. Posted by: The GrandMaster 2 years ago. Posted by: Daz 13 years ago. I can see you posted this a year ago, but I've only just found it.
You've done all the hard work for me. Great work, well done. I will be using a version of your script: can you tell me if you've found any problems with it in the wild since you posted it? Comments: Muadip - does this un-install remove all versions including Java 6 and Java 7 silently? Muadip - I've tested your script and it worked on Win7x86 but it didn't work on Win7x64 because the Registry settings are different WowNode. I already changed it to reference this but it's still not working.
All the Java versions from your computer are being removed. Daz - You rock. Thanks for the script. Very pretty. One question I have a install base with all manner of ancient JREs.
I recently saw a 1. I am pushing the current version with a GPO, but I would like to clean up the old ones. Your script looks ideal, but I don't know how to exclude the current version[1] of the JRE from being uninstalled. How hard is that? How do you use the script? Thanks again.
Daz, point taken but a check out some of the MS scripts which feature a routine called BugAssert. It makes the job a breeze. Used once, you'll never trot out that excuse again. I was trying to guide folks who might adopt it for their own use that that Utopian environment may not exist. VBScab, Fair points, well made. Simple solutions always appeal to me :o I only found the technique via the MS forums though searched for: "bugassert" site:microsoft.
Cheers, Daz. Simple solutions always appeal to me :o Spot on. Nice, eh? Posted by: JeanM 12 years ago. Hello, First I wanted to thank you guys for this script. SCCM considers 99 as a failure. Thanks Hi Jean, Yes you can just change that line to determine the exit code for if the script did not find any Sun JRE versions to uninstall.
I always use 99 in my scripts to mean 'Job not required or already run'. Jean, Please note that Galen Dobbs' later version of my script sets qVal to 99 in more than one place. I suggest that you, and indeed anyone using these scripts, tests, tests, tests and tests again before rolling any version of this script out to your live estate. Regards and good luck, Daz.
Please note that Galen Dobbs' later version of my script sets qVal to 99 in more than one place. That way, if someone has a requirement to use a different value, the change would only need to be made in one place.
Thanks guys, I am using the version that doesn't install anything. Posted by: rmmiles 12 years ago. Posted by: yeah yeah 11 years ago. This is an old thread but i'll try to resurrect the topic. Object" I get an ActiveX Ac path not found errors. This happens locally and when I push via SMS. Posted by: pjgeutjens 11 years ago. Object" if that's copy-pasted from your script, I suggest you give the original another read FileSystemObject" Find the difference [; ].
I'll need to look at my work computer and see how it's written. I was typing from an iPad yesterday so I may have typed it in wrong when i was responding back to the thread.
Hopefully that is it. Posted by: hipsterdoofus 11 years ago. I ran across this and the script is just what I need. The only problem I'm running into is this: The uninstall works fine, but on installation, it wants me to click to allow the executable to run get a security warning. Is there a way around this? Probably need a different implementation, but I was just running it out of a vbs script. That's an XP thing, perhaps applied via GroupPolicy? There's nothing a package can do to bypass that.
Right-click the file that's throwing this warning, go to properties and see if there's an "Unblock" button. If there is, click it. Identifier , this will show you the stream containing this value.
This has to do with the file's ZoneIdentifier telling windows it comes from an untrusted location PJ. Quit End Sub. Posted by: lyonjr 10 years ago. This script works great, but I have 2 different Java versions that I do not want removed.
Can anyone help me with adjusting the script for that? Posted by: hgsisbyoot 10 years ago. Posted by: xyzzy. Any ideas would be a great help. Thanks in advance. The only thing I can think of is that you are now working on an x64 box. See my above post. First, thanks to the original creators of this script. It's pretty awesome. Here's an updated version of the script I created for our computer labs.
It's strictly an uninstall script but it will preserve a desired version. The script does create log files for each individual uninstall in a specified path. Two caveats: 1. Java versions 1. At least I couldn't find a way after a week of searching and testing.
This script reflects that. If you have two or more of these versions installed and uninstall one it breaks the uninstall for the others as ActPanel. You have to remove the uninstall info for the other versions from the registry and reinstall them again to remove them properly.
It may also leave lots of cruft on the system. Posted by: pndragon 10 years ago. Is there a specific switch I need to add to the script's parameters to ensure that it runs silently? Any idea what's going on? I appreciate the time you put into updating this script and whatever input you or anyone else may have on my issue. Thank you. It was originally written to be included in an SCCM deployment as part of a package of scripts that would remove Java and install the newest version.
I never tested it as a startup script but I think I see what happened. It makes a few assumptions, which isn't really a good thing for a standalone startup script.
It assumes that the log file directory already exists and is writable to the user account running the script. If that directory doesn't exist you'll see the errors with MSI packages.
Saves a lot of tedious object creation and error checking in a VBS script. The script was also not designed to be run silently. As part of a SCCM package it was intended to be run when no user was present, like overnight.
As for the beeping No idea what caused that. Found a fantastic gotcha with SCCM on 64bit machines while testing this script. Our main deployment scenario is to 32bit machines. This script was tested on 32bit and 64bit machines as an admin user and on 32bit machines under SCCM. Worked great for our purposes. Turns out it didn't work great under SCCM on 64bit machines. The SCCM client was running the script in a 32bit environment on a 64bit OS so all script calls to the registry were being reflected to the WowNode branch.
Essentially the script couldn't see the 64bit uninstall keys in the registry and was running through the 32bit uninstall keys twice. I've updated the script with a new method of calling the registry so it should always see the complete registry even when running in a 32bit environment under 64bit Windows. It's been working well in our testing so far. I also added a bit more error output if an error does get caught and changed the InstallShield uninstall template file to NOT remove shared files.
This fixes the bug with Java versions 1. It leaves a few DLLs on the system but the security increase of removing all old Java versions outweighs that in our environment.
Please modify as needed. If you find a bug or add a useful modification please post it back! Shell" 'Set the logfile path here. This path should already exist. String needs trailing slash.
Is it possible to set the script so that it will keep more than 1 version of Java? The comments explain the changes. Posted by: hahnwo 10 years ago. Newbie question. How exactly do I run this script? Posted by: EKutsko 10 years ago. I have tested this script on a VM with 3 different versions installed and it works pretty good. It took me a while to figure out I had to run it from and Administrative Command Window, but once I did that it worked really well. I have to ask now how you guys are running this with SCCM.
I thought it would be fairly simple, but what I did ended up not working. I created a package with no source files. Search Advanced search…. New posts. Search forums. Log in. Install the app. Contact us.
Close Menu. JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding. You are using an out of date browser. It may not display this or other websites correctly.
0コメント