Script work on some PC but not others
We created a script to remove old java from PC and install the new version 8u51. It works on a new PC we placed on the network, but does not work on PC that have been on the network for some time. Both have the same version of Kace on it. The new PC we can see the program installing and the other it just flashes in task manager for a while then disappears, while the new PC you can see it installing in task manager.
Community Chosen Answer
I have switched to using wmic to uninstall old java in my search and destroy java script.
Just make sure to check "wait for completion" for each step.
/c wmic product where "name like 'Java 7 Update%%'" call uninstall /nointeractive
Currently patching is pushing out j8u66 but prior to it showing up I was using an MI to install
jre-8u66-windows-i586.exe INSTALL_SILENT=1 STATIC=0 REBOOT=0 AUTO_UPDATE=0 EULA=0 WEB_ANALYTICS=0 WEB_JAVA=1