I have had to create a script that removes all possible versions of Java.
Yes, there are scripts that remove all of them using WSH, but this one uses native kaseya scripting, so that you can add your own logging, or exclusions. This script has no logic, all you would need to do is add some logic to keep a particular version.
I used the SQL below to collect the data.
SELECT DISTINCT uninstallStr FROM ksubscribers.dbo.windowsAddRemProg WHERE (displayName LIKE '%Java%') ORDER BY uninstallStr DESC
We only had 66 different versions, so if you find some I don't have on here, please share :)
and why you don't do something like :
wmic product where "name Like 'JAVA%'" call uninstall /nointeractive
with this method, you don't have to add anything to repo
Forget, i'm french and misunderstood :D