/build/static/layout/Breadcrumb_cap_w.png

Script work on some PC but not others

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
  • Sounds like the batch file is not returning as successful.
    We would need more details(Error Logs, return/status codes from K1 agent) - jleitsch 9 years ago

Answers (4)

Posted by: SMal.tmcc 9 years ago
Red Belt
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
Posted by: anonymous_9363 9 years ago
Red Belt
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.

Comments:
  • 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. - Kdebiasse 9 years ago
Posted by: anonymous_9363 9 years ago
Red Belt
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.
Posted by: Kdebiasse 9 years ago
9th Degree Black Belt
0
Got the script to work. Thanks everyone for the comments.

Comments:
  • could you mark it answered - SMal.tmcc 9 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ