In our environment we are using SCCM to push out both the x32 and x64bit versions of Java to all PCs. I have created a batch file that silently installs both and removes older versions of Java (since Java 8 no longer auto uninstalls older versions). This has been working fine, except now  that update 111 has come out I can't seem to figure out the uninstall key for the 32bit ver of update 101. When I look through the registry I can find the key for the 64bit ver and write a command to uninstall that with no issue. But I can't find anything in the reg for the 32bit ver. Running the command MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180101F0} /q /norestart  will uninstall the 64bit one successfully, yet it leaves the 32bit one out there. Looking at my previous batch files I only had one uninstall key per version so I'm assuming it effectively uninstalled both 32 and 64bit versions, although I'm not 100% certain of that. Any suggestions?

1 Comment   [ + ] Show Comment

Comments

  • If you want to find all guids of installed software, you can type in a cmd : "wmic product list brief" .. it will return all software info from "installed softwares in control panel"
Please log in to comment

Community Chosen Answer

1

Is this an msi file that you are running to install JAVA 8 Update 101?

If so, edit the msi and get the produck key from the properties.
Then run msiexec X {RODUCTKEY} /qn REBOOT=ReallySuppress /l*V "path to log" and see how it goes

Answered 10/28/2016 by: techsurfer
Yellow Belt

  • Yep that did it, thanks!! Go figure, the last part of the product code has a 32 or 64 in it based on the version haha. ex. ...2F6418... or ...2F3218...
Please log in to comment

Answers

0

I was in the same boat to deploy Java 8u102 (had to go with older version for compartability issues with one vendor site), previously removing all older versions. I use powershell script to run the upgrade process ( SCCM application runs that script ). I run a WMI Quiery to get all versions of 32-bit and 64-bit Java with these quieries:

For 32-bit:

$query= "select * from win32_Product where (Name like 'Java %' or Name like 'Java(TM)%' or Name like 'J2SE%') and (Name <> 'Java Auto Updater') and (Not Name like '%(64-bit)%') and ((Vendor='Sun Microsystems, Inc.') or (Vendor like 'Oracle%')) and (NOT Name like '%CompuGROUP%') and (NOT Name like '%IBM%') and (NOT Name like '%DB%') and (NOT Name like '%Advanced Imaging%') and (NOT Name like '%Media Framework%') and (NOT Name like '%SDK%') and (NOT Name like '%Development Kit%')"

For 64-bit:

$query= "select * from win32_Product where (Name like 'Java %' or Name like 'Java(TM)%' or Name like 'J2SE%') and (Name <> 'Java Auto Updater') and (Name like '%(64-bit)%') and ((Vendor='Sun Microsystems, Inc.') or (Vendor like 'Oracle%')) and (NOT Name like '%CompuGROUP%') and (NOT Name like '%IBM%') and (NOT Name like '%DB%') and (NOT Name like '%Advanced Imaging%') and (NOT Name like '%Media Framework%') and (NOT Name like '%SDK%') and (NOT Name like '%Development Kit%')"

Then

$javas=Get-WmiObject -query $query

With this method I can remove all versions before installing new one.

I can provide full script , if interested.

Answered 11/14/2016 by: emilchik
White Belt

  • Not helpful. This post asked for uninstall, not install, which is what I'm looking for too.
Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share