Uninstalling All versions of Java from Windows Silent

Hi Everyone,
If there is something somewhere on Sun sites that does this already I appologize, but I have to get all previous version of Java from Sun uninstalled from over 700 hundred PCs and so I have created a set of scripts to uninstall all previous versions.
You would copy 'java-uninstall.bat' and 'java-uninstaller.vbs' to c:\temp (make sure you have one) the script can be modified for another location of your choosing. Then you can execite the batch file or have it scheduled to do that with the NT 'AT' command. It will uninstall anything that shows up in Add/Remove programs with 'Java' in the displayname and 'Sun' as the publisher. This would including removal of SDK amd JRE versions, so keep that in mind.
This could probably be used in the login script, but thats not how I deploy updates, it may be fashioned to work with SMS, I don't know. I have a script that goes through network copying files to c$ shares and scheduling it for later in the night.
Also note this just uninstalls the older versions I have another script that does the reinstalling of the newer version.
Files below:
[java-uninstall.bat]
REM <start>
@echo off
if not exist c:\temp\. mkdir c:\temp
REM Export the Uninstall registry keys
start /wait "" REGEDIT /E c:\temp\registry.tmp HKEY_LOCAL_MACHINE\SOFTWARE\microsoft\windows\currentversion\uninstall
REM Filter only the {} keys that Java might be in
type c:\temp\registry.tmp | find /i "\{" | find /i "}]" > c:\temp\uninstall.tmp
REM Run the Vbscript that uses this file to find Java Sun entries to uninstall
cscript c:\temp\java-uninstaller.vbs
REM <end>
[java-uninstaller.vbs]
'<start>
Set WshShell = WScript.CreateObject("WScript.Shell")
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Const ForReading = 1, ForWriting = 2
'Open the exported registry file
Set MyFile = fso.OpenTextFile("c:\temp\uninstall.tmp", ForReading)
Do While mYFile.AtEndOfStream <> True
     ReadLineTextFile = MyFile.ReadLine
     Uninstall = ReadLineTextFile
     CLSID = Mid(Uninstall, 73, 38)
     On Error Resume Next
     'DisplayName
     DisplayName=WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"+CLSID+"\DisplayName")
     'Publisher
     Publisher=WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"+CLSID+"\Publisher")
     'Search for presence of Java and Sun in DisplayName and Publisher
     search1 = Instr(1, DisplayName, "Java", 1)
     search2 = Instr(1, Publisher, "Sun", 1)
     'Execute removal if there is a match
     Uninstaller="MsiExec.exe /X"&CLSID+" /QN"
     if search1>0 And search2>0 Then Return = WshShell.Run(Uninstaller , 1, TRUE)
Loop
'<end>

Here is a batch file that I wrote to accomplish the same objective of uninstalling all versions of Java Virtual Machine JVM from a XP/Vista box:
You can name it anything you like, such as cleanjava.bat:
@echo off & cls
Rem List all Installation subkeys from uninstall key.
echo Searching Registry for Java Installs
for /f %%I in ('reg query HKLM\SOFTWARE\microsoft\windows\currentversion\uninstall') do echo %%I | find "{" > nul && call :All-Installations %%I
echo Search Complete..
goto :EOF
:All-Installations
Rem Filter out all but the Sun Installations
for /f "tokens=2*" %%T in ('reg query %1 /v Publisher 2^> nul') do echo %%U | find "Sun" > nul && call :Sun-Installations %1
goto :EOF
:Sun-Installations
Rem Filter out all but the Sun-Java Installations. Note the tilda + n, which drops all the subkeys from the path
for /f "tokens=2*" %%T in ('reg query %1 /v DisplayName 2^> nul') do echo  . Uninstalling - %%U: | find "Java" && call :Sun-Java-Installs %~n1
goto :EOF
:Sun-Java-Installs
Rem Run Uninstaller for the installation
MsiExec.exe /x%1 /qb
echo  . Uninstall Complete, Resuming Search..
goto :EOFAdditional Info: http://tinyurl.com/29cdah
Hope this helps.

Similar Messages

  • Cannot uninstall old version of ITunes from Windows XP pc.

    Cannot uninstall ITunes from Windows XP pc.

    Itunes uninstalled from the control panel, but still shows in the start menu. I keep getting an error from popping up that itunes helper cannot run without itunes. Very annoying.

  • Want to uninstall all versions

    In the past I have installed multiple versions of Visual Studio Express (2008, 2010, 2012, 2013). Included in this is multiple versions of SQL Server. I just want a fresh start. I know not to uninstall any versions of .NET Framework or the C++ Redistributables.
    I have uninstalled all versions of Visual Studio. (My plan is to have just the 2013 version installed in the end). I'm using Window 7. In Programs and Features there are 28 different entries with SQL Server listed in them. Including 2005, 2008, 2012 and such.
    I would like to clear these out and start with just one version. I'm sure I can just Uninstall all 28 entries but I don't want to break any pre-existent software that might be using an older version.
    Is there a way to delete all of these, then install just a latest version and not break any software?
    Thanks,

    Hi,
    Refer below links
    How to uninstall SQL Server 2005
    How to uninstall SQL server 2008 and 2008 r2
    Please read both links clearly before proceeding
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • Uninstalling multiple version of Java across a LAN

    We have people using all kinds of diferent version of Java from 1.4.1.x to 1.5.x.x but we need every one to be on 1.4.2.06 for a training application. I have been tasked with getting every one on the same version.
    I wanted to uninstall any and all version on the system and then install the correct version. But I dont see how to do that.
    I would be happy if I could just install the correct version and have it override the older or newer version.
    Any one have a clue how this could be done?
    All I really need is a command line I could use ...

    Depending on exactly what you are doing, just installing the 1.4.2_06 JRE (not SDK) may be the solution.
    Try it and see.

  • Can't install Adobe Flashplayer 11. Uninstalled old version. enabled Java. Allowed cookies. Install button grey.

    Can anyone help me with this problem of installing Adobe Flashdrive 11, the latest version ? I'm bashing my head against the wall. Started when iPhoto would not load to Facebook and was advised it could be Flashplayer update after troubleshooting other options including deleting extraneous iPhoto files. I uninstalled older version, enabled Java, allowed cookies, downloaded installer but when I try to download it, the install button is grey and won't work. (This is, coindcidentally the same problem that suddenly began today with iPhoto which always worked fine before....grey button for "publish") It is ALWAYS a problem installing Adobe anything, and usually this same problem. All my software updates are current. Now I have NO Flashplayer and can't use YouTube at all, much less iPhoto.

    Also, sounds like others are having this problem. Read other posts, didn't find an answer. OBVIOUSLY did not solve my problem. No delete ? First time here, sorry.

  • Can I update free to Windows 10 from my Aspire ZC-102 All in One desktop from Windows 8.1?

    Can I update free to Windows 10 from my Aspire ZC-102 All in One desktop from Windows 8.1?I bought my ACER with Windows 8 on it a year ago thru HSN. Then I upgraded to 8.1 using the Store thing on the computer. I've not been a fan of 8 or 8.1. I'm told that Windows 10 comes out on Friday and that upgrades are free somehow. Maybe that's thru doing the beta testing that I've read about. I don't know. But I'm not in very good shape financially and my computer's operating system is going nuts on me so an upgrade would probably fix things pretty well.
    I'd tried to do a Repair Install of 8.1 but was somehow told that since I'd upgraded from 8, a Repair Install couldn't be done thru the Control Panel. I'm clueless and I'm hurting. Can I have some help please?

    Thanks. I see that white icon down by the clock that hovered says GET WINDOWS 10. So even though I downloaded Windows 10 yesterday and burned it into being a bootable DVD, I went ahead and just Reserved My Upgrade since the DVD hasn't been cooperating.When I stuck it in and hit any key as the ACER started, it brought me to a screen that I couldn't figure out what to do on. I was clueless and I didn't want to cause myself any grief by just trying anything. I did just backup my28+ GB of Photos, Docs, Desktop, Downloads & Music.
    But I don't want to accidentally do a clean install, which I've done before on my XP Tablet pc and that sure isn't any fun for a novice like me.
    I only use Office 2013 and an old Paint Shop Pro 6.0 which is really old and isn't their newer v6 so it has to run in Compatibility Mode in 8.1. I'm not an APP guy either. I do use OmniPass software for passwords so I can Save and Restore them if needed, so I had to buy a 64 bit version of that to run on this ACER.
    So I guess my next step is to just wait for a Notification from Microsoft that I can now switch to 10 which I think it said will just download so my DVD won't even be needed for anything but as a repair tool.That icon you told me about brought up a screen and on it it said that it found my PC to be compatible with Windows 10. So does that mean that drivers and everything ACER will work as they should or will I need to get anything off the ACER site to make my PC work with Windows 10?

  • Uninstalling oracle 10g enterprise edition from windows vista

    HI There,
    I want to uninstall oracle 10g enterprise edition from windows vista home premium edition. I have uninstalled it using oracle universal installer and then deleted folder from program files. But I am unable to delete the main folder i.e. D>Oracle..
    It is displaying error message 'access denied' Please suggest me on this issue.. How can I delete that one so that I can instal it again. I would be really grateful.
    kind regards

    Can someone help me on this issue.. That would be great...

  • Silently uninstalling all Creative Cloud components on Windows

    Hi
    We have a package containing Photoshop, InDesign, Illustrator and Acrobat and our silent installation works fine, but uninstalling all components have left me with a single challange beyond my capabilities. The last component I need to remove silently is the Creative Cloud application using the "Creative Cloud Uninstaller.exe" located in C:\Program Files\Adobe\Adobe Creative Cloud\Utils. No matter how I execute that program it will not be silent. A prompt is presented every time asking me whether I want to remove the application with the options Uninstall or Cancel. Additional it's not a problem I had with CS6, but an entirely new one included with CS7 aka CC
    We are using a software deployment tool to deploy Creative Cloud for Teams to the persons that have a license and use the same tool to remove the software when it need to be replace by something newer or license is moved to another person.
    Any tips?
    Anders

    Hi again,
    A quick update.
    I realized that our organization don't have any need for the Creative Cloud desktop application, hence I created a new package and excluded it. At first I didn't understand this was possible, but at the 2nd step in CCP (create package) if you click the blue colored (Change) button and check the first check box, you disable the Creative Cloud desktop application.
    HTH you and others!
    /Pelle

  • How do I delete any previous versions of Java from my machine

    My name is Mason McFadden. I like to play on a game site called http://www.pogo.com/ in safari & several other internet browsers for the mac. I'm having many issues with the games such as freezing, my game window being squished smaller, games not loading, games getting stuck, etc.
    Pogo's support team has told me to make sure that all previous versions of java on my machine are uninstalled, and to update my java via a link they provided me with. However, on a mac, I don't see java listed in the applications folder, therefore I'm unsure of how to "uninstall any java versionsI may have if you will. Pogo games run on Java, which is why it needs it, and pogo believes there's a problem in my java, and it's crashing.
    Does anyone know of this game site? If anyone plays it, do you have any trouble with the games? How can I check out my Java? Although pogo's troubleshooting team told me to try to contact Apple support agents on top of their own support team working at my issue, I thought I might post a community forum first, as the phone calls are fee based. If someone out there has any suggestions or can help me before it be necessary for me to call support agents, I'm open. Please let me know. Does pogo run on a specific version of Java? I have the iMac with OS X 10.6.8. NOT the OS X Lion 10.7. Please let me know. Thank you to all and I look forward to speaking with you soon. I never had any problems when I first got my computer until one day I ran a software update. I hope some of this information is helpful. Thank you again. Enjoy your day!
    Sincerely Yours,
    Mason McFadden

    You must select all ur mails and delete them at the same time, then go to the trash folder and delete all mails from there too, also delete mails from send folder and from every folder, that make recovery all those GB you have storaged

  • Unable to uninstall ATG 9.4 CRS from windows 7 - 64 bit

    Hi,
    I am trying to uninstall ATG9.4 CRS from Windows Add/Remove programs. But I am getting the below error in pop-up and unable to uninstall the software.
    Win64 not supported
    The author of the package you are installing did not include support for this platform.
    Also I tried to uninstall from ATG9.4 CRS directory, still getting the same error.
    There was a recommended settings option was shown to uninstall on click of the Uninstall from Add/Remove programs. But still getting the same error.
    My OS details:
    Windows 7 64 bit.
    Java version - jdk1.6.0_45
    Please help me in uninstalling this software.
    Thanks

    Hi,
    you can try below work around, i recommend not to perform this directly on production, try this in dev machine first.
    force uninstaller to use 32-bit jre:
    1. copy jre to the system 
    2. run >"Uninstall.exe" LAX_VM <path_to_jre>
    Thanks & Regards
    Suman Vasireddy
    Please mark any update as "Correct Answer" or "Helpful Answer" if that update helps/answers your question, so that others can identify the Correct/helpful update between many updates.

  • Cannot uninstall previous versions of iPod for Windows

    Over a year ago, my roommate gave me his old iPod. I installed it and iTunes and it worked fine until the battery on the iPod died and everything went nuts with the iPod - iTunes worked fine.
    Now i have a new 30 gig video iPod, but I can't get anything working. I had to fight to update iTunes / Quicktime. Basically, I had to run:
    "C:\Program Files\Common Files\InstallShield\Driver\8\Intel 32\IDriver.exe" -Embedding
    from the command line. I don't know why, but it worked.
    Now I have three versions of "iPod for Windows" installed. I click to uninstall any of them (from add / remove programs) and nothing happens.
    I wouldn't care, but when I run iTunes with the iPod connected, it says "the software required for communicating with the ipod is not installed correctly."
    I've tried everything I can see, but I'm suspicious the three versions of iPod for Windows are conflicting with each other and / or iTunes.
    Can anyone offer any help?
    Thanks in advance.
    Sony Vaio Laptop   Windows XP  

    Yes it is, the iPod updater was integrated with iTunes when version 7 was released. As a back up, you might want to keep the last one in case you ever needed it but dispose of the rest, they are just taking up space.

  • Uninstalling All Versions of Application Prior to Installation

    Hey Guys - 
    For the application Adobe Reader (X and XI), I've created custom source files/folders which have the updates slipstreamed into them plus include Transforms created with the Adobe Customization Wizard.  Once made into Applications, they deploy / install
    as intended.
    On some systems which have older versions of Reader installed, the users try to install the new versions which fail.  I've found that uninstalling their old version then trying to install from App Catalog works fine therefore I'm trying to add a function
    in each Adobe Reader Application (X & XI) to uninstall first using "msiexec /x {AC76BA86-7AD7-1033-7B44-AA1000000001} for X and another GUID for XI.
    I planned on adding a new deployment type and making it a pre-requisite - but - how do I configure a Detection Method for an uninstall?  All of this would be super easy in a Task Sequence or Program, but not in a an Application.  I tried creating
    a batch file which uninstalled then made a new empty directory in a hidden area to set as detection method but failed.
    Any Suggestions?  Thanks!
    Ben K.

    Hi,
    Use the PS App Deployment Toolkit,
    https://psappdeploytoolkit.codeplex.com/
    It has a feature to uninstall "Adobe Reader" for instance and it will uninstall all installed versions of a Adobe Reader. Works Great!
    Regards,
    Jörgen
    -- My System Center blog ccmexec.com -- Twitter
    @ccmexec

  • Problems dowloading upgraded version of Java using Windows Vista

    I am unfortuneatly using Vista OS and easch time I try to log into a game area such as POGO.com it asks me to download Java. When I do it tells me it downloaded successfully but when I click "PLAY NOW" it just asks me again to download Java. Is there a patch that I need to use because of Vista? What can I do to get past this? I am fed up!

    I have no specific answer to resolve the problem. Try searching the net, others have likely experienced the same problem and may have a solution.
    If you wish, you can try using Windows install/remove program function to uninstall all Java installations it lists. Reboot, then see what POGO asks you to do.

  • Uninstalling Multiple Versions of Flashplayer from 10,000 Machines

    We are preparing to upgrade Adobe Flasplayer to the most recent version. The major headache in the past has been uninstalling older versions of Adobe Flash Player. I downloaded uninstall_flash_player.exe and cannot even get a list of switches to use with the /? switch. I keep getting a message stating
    Adobe Flash Player Installer/Uninstaller 10.3 r181 has encoutnered a problem and needs to close. We are sorry for the inconvenience.
    The frustration level in attempting to use your products on a large network is difficutl to describe, but I am frustrated already and have not even gotten past the first step. Needless to say I do not have the option to touch each machine manually. I am running this on a Windows XP Service Pack 3 machine, but will also be uninstalling/installing on 64 bit Windows 7 machines.
    Any help would be appreciated.

    Hi Sandy Martin,
    I ran your query past a member of the engineering team that focuses on install and uninstall issues, and got the following response:
    Can you please ask [the poster] for the FlashInstall.log file located in \Windows\System32\Macromed\Flash directory and a screenshot of the error? 
    Also, if he/she has 10,000 machines to update, I hope they’re licensing the player and distributing it via SMS Catalog.  Info here http://www.adobe.com/products/flashplayer/fp_distribution3.html and details for this type of deployment are posted in the Admin Catalog (http://www.adobe.com/devnet/flashplayer/articles/flash_player_admin_guide.html).
    I also happened across an article from the Adobe Developer Center that addresses the issue of enterprise deployments: http://www.adobe.com/devnet/flashplayer/enterprise_deployment.html.
    Hope this helps,
    KALTechWriter

  • Should I remove older versions of Java from Add/Remove Programs?

    I have about 9 or 10 older versions of Java mostly version 5 updates 2-11installed in the Add/Remove programs section of Control Panel. Should I remove these or leave them installed before installing the next update 6.2?

    Yea, you should definitely remove them via the add/remove tool.
    Sometimes if you are developing for different versions you might
    have more than one - but in most cases more than 1 or 2 is
    unnecessary.

Maybe you are looking for

  • How do I open a scanned picture in Firefox?

    <blockquote>Locking duplicate thread.<br> Please continue here: [[/questions/858927]]</blockquote> I have some pictures scanned and saved in my computer. How do I open one of them in Firefox? I'm trying to design a book cover and need to open a pictu

  • ITunes store will not load on my computer.

    The status bar loads about half way.  I need help!  Internet is working.  Husbands computer sitting right next to mine can load the store.  I have uninstalled all apple products and re-installed.  

  • PI 7.1 Performance Monitoring - Advanced Adapter Engine (AAE)

    Hi Experts, how can i use the "Performance Monitoring" from the RWB, to see all the messages (including the messages from the AAE) for a specific timeperiod? For example, i want to know how many messages go through the PI (including AAE) on one day.

  • How to put music in the app

    Hi, I just installed windows 8.1 on my new PC. The thing is, my OS is installed in an SSD while my other files are on another hard drive. I am having trouble adding music to the music app and picture videos etc.... I tried to put the songs in the mus

  • Binding AD to OD server

    I have found a lot of articles regarding binding an OS X server to an AD domain, but am trying to do the reverse. We want to store all our account info on the OD server and have our few remaining windows users bound to a slave AD domain. Can anyone p