I have an AutoIt script that goes through and removes all Java 7's before installing the newest version. If you're familiar with AutoIt, you can use this. If not, you can at least get the product codes. Looking at the productIDs below, you can see all of them are the same except for the last couple of numbers. Once they get to the 70, that's for Java 7.0, and then the green is the Update version. I haven't done this with Java 6 but I would assume you could substitute the 70 in yellow for 60.
RunWait ("msiexec.exe /qn /x{26A24AE4-039D-4CA4-87B4-2F83217009FF}", @SystemDir, @SW_HIDE) ; Java 7 Update 9 RunWait ("msiexec.exe /qn /x{26A24AE4-039D-4CA4-87B4-2F83217007FF}", @SystemDir, @SW_HIDE) ; Java 7 Update 9 RunWait ("msiexec.exe /qn /x{26A24AE4-039D-4CA4-87B4-2F83217007FF}", @SystemDir, @SW_HIDE) ; Java 7 Update 7 RunWait ("msiexec.exe /qn /x{26A24AE4-039D-4CA4-87B4-2F83217005FF}", @SystemDir, @SW_HIDE) ; Java(TM) 7 Update 5 For $x = 10 to 50 ; Remove all 32-bit Java's from 7u10 to 7u50 $cmd = "msiexec.exe /qn /x{26A24AE4-039D-4CA4-87B4-2F832170" & $x & "FF}" RunWait ($cmd) sleep (200) Next For $x = 10 to 50 ; Remove all 64-bit Java's from 7u10 to 7u50 $cmd = "msiexec.exe /qn /x{26A24AE4-039D-4CA4-87B4-2F864170" & $x & "FF}" RunWait ($cmd) sleep (200) Next If you wanted to set up a query (or run it in SQL studio), you can use this to get all of the product ID's for one application select distinct arp.DisplayName0 as 'Application Name', arp.Version0 as 'Application Version', arp.ProdID0 as 'Product ID' from v_R_System sys inner join v_GS_ADD_REMOVE_PROGRAMS arp on arp.ResourceID = sys.ResourceId inner join v_GS_COMPUTER_SYSTEM cs on cs.ResourceID = sys.ResourceId where arp.DisplayName0 like '%Java%' From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com] On Behalf Of Bhasker Chittanoori Sent: Wednesday, January 29, 2014 1:54 PM To: MSSMS SMS Subject: [mssms] SCCM 2007 Query/Collection for Unnstall java version for below 6.18 I am trying to look for a product code for uninstalling java below 6.18 versions. Does any one know where and how do I get it. I know that from SCCM console -> start -> explore -> installed applications will show the product ID and Product code, but is there any query or collections where I can create with the particular version? management wants to uninstall all the lower versions below 6.18, any help would be appreciated., Bhasker, Chittanoori Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you. Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you. ________________________________ IRS Compliance: Any tax advice contained in this communication (including any attachments) is not intended or written to be used, and cannot be used, for the purpose of (i) avoiding penalties imposed under the Internal Revenue Code or applicable state or local tax law or (ii) promoting, marketing, or recommending to another party any transaction or matter addressed herein. ________________________________ Confidentiality Notice: This e-mail is intended only for the addressee named above. It contains information that is privileged, confidential or otherwise protected from use and disclosure. If you are not the intended recipient, you are hereby notified that any review, disclosure, copying, or dissemination of this transmission, or taking of any action in reliance on its contents, or other use is strictly prohibited. If you have received this transmission in error, please reply to the sender listed above immediately and permanently delete this message from your inbox. Thank you for your cooperation.