xlbxT9.jpegHello,

 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.


Please help!!!!!!

 

1 Comment   [ + ] Show Comment

Comments

  • Sounds like the batch file is not returning as successful.
    We would need more details(Error Logs, return/status codes from K1 agent)
Please log in to comment

Community Chosen Answer

1
try checking "on failure" Continue instead of break.  unless every single version of java you are trying to remove runs it will generate a failure during the uninstall.

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.

$(KACE_SYS_DIR)
cmd
/c wmic product where "name like 'Java 7 Update%%'" call uninstall /nointeractive

9Qiwuo.jpeg
QkdZiv.jpeg

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
Answered 11/18/2015 by: SMal.tmcc
Red Belt

Please log in to comment

Answers

0
>We would need more details(Error Logs, return/status codes from K1 agent)
Quite. By the look of the screenshot, your MSIEXEC command line doesn't include logging. Add verbose logging and re-try. Having said that, JRE MSIs are merely a "transport" for the Java installer, not "proper" MSIs but at least you'll get something!

Also, in this kind of scenario, you should:
- test the script from a command line on a failing machine
- once you're happy that it works, re-test using PSExec, using the same account to execute as KBox, normally, the local System account
- re-test from KBox.

You might also want to take a copy of a failing machine and create an off-line VM from it. That way, you can test at your leisure and not disrupt the user.
Answered 11/18/2015 by: VBScab
Red Belt

  • Removal old Java works its the installation of the new Java that does not. It starts then ends quickly. On PC that it works java installation take a while longer.
Please log in to comment
0
Yes, our psychic powers told us that already.

Extract the MSI from the new EXE and use that, adding logging to that.

BTW, you're aware, are you, that you're not disabling automatic updates or the brain-dead "JRE is out of date" prompt? Both are documented here in IT Ninja.
Answered 11/18/2015 by: VBScab
Red Belt

Please log in to comment
0
Got the script to work. Thanks everyone for the comments.
Answered 11/18/2015 by: Kdebiasse
Sixth Degree Black Belt

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