Need to uninstall Java on a series of machines? Either because, you need to do a fresh install, or updates are failing? Or maybe your client is a public school system that has a mandate to remove all JRE 6 versions because of security issues? …yeah that’s the one.
Remove JRE 6
wmic product where "name like 'Java(TM) 6%%" call uninstall /nointeractive
That’s the script that went into my package that I recently finished running on about 15,000 systems or so. If you’d like to remove them all, you can do that too.
Remove all Java
wmic product where "name like 'Java%'" call uninstall /nointeractive