/build/static/layout/Breadcrumb_cap_w.png

Software Deployment Question


Kace K1000 uninstall Java 8u60 on all machines

10/28/2015 2903 views
I have a K1000 Managed Install that pushes out Java 8u65 and that is working fine.  However, I cannot uninstall Java 8u60 from my machines through Kace.

I have a script that runs MsiExec.exe /X {26A24AE4-039D-4CA4-87B4-2F83218060F0} /qn.  When I tell the script to run, it executes, and show 97% successful.  However, Java 8u60 does not uninstall.  Any thoughts on what I'm doing wrong?

The script is setup as follows:
* Enabled
* Labels:  Java Updates x86 Machines
* Windows Run As: Local System
* Notify Users: unchecked
* Schedule: None

Tasks 1:
Verify -
1) Search for Java in Install on C: and delete
2) Unzip \\pvb\public\Network-IT\Kace_Deployments\Remove_Java.zip to C:\Install\Java_Remover.

On Success -
1)
Launch C:\Install\Java_Remover\Remove_Java.cmd with params .

The Remove_Java.cmd file, essentially is an @ech off followed by several lines of MSIEXEC.exe /X {<string of characters>}
Answer Summary:
2 Comments   [ + ] Show comments

Comments

  • I'd like to point out that I'm doing either the "Run Now" option, or I'm checking the job and choosing "Run" from the Action menu.
    • we are new to the k1000 and we need to do this after each version comes out right away...do you have any screen shots you can share of the complete set up.
  • if they have been updated I have seen the /x guid uninstall not work.

Answer Chosen by the Author

1
I went to an MI to install Java 8u65, that way if it is at 65 already this will not even run.

I zipped up java with a batch file.

start /wait wmic product where "name like 'Java 7 Update%%'" call uninstall /nointeractive
start /wait wmic product where "name like 'Java(TM) 6%%'" call uninstall /nointeractive
start /wait wmic product where "name like 'Java(TM) 7%%'" call uninstall /nointeractive
start /wait wmic product where "name like 'JavaFX%%'" call uninstall /nointeractive
start /wait wmic product where "name like 'Java 8 Update 2%%'" call uninstall /nointeractive
start /wait wmic product where "name like 'Java 8 Update 3%%'" call uninstall /nointeractive
start /wait wmic product where "name like 'Java 8 Update 4%%'" call uninstall /nointeractive
start /wait wmic product where "name like 'Java 8 Update 5%%'" call uninstall /nointeractive
start /wait wmic product where "name like 'Java 8 Update 60%%'" call uninstall /nointeractive
start /wait jre-8u65-windows-i586.exe INSTALL_SILENT=1 STATIC=0 REBOOT=0 AUTO_UPDATE=0 EULA=0 WEB_ANALYTICS=0 WEB_JAVA=1

Answered 10/28/2015 by: SMal.tmcc
Red Belt

  • you can use this line in your script also

    cmd /c wmic product where "name like 'Java 8 Update 60%%'" call uninstall /nointeractive
    • you can also do it in one line
      Launch “$(KACE_SYS_DIR)\cmd.exe” with params “/c wmic product where ”name like 'java%%'“ call uninstall
      since all java versions are uninstallable in one with that (tested it multiple times, so you don't need to start /wait )
      • I appreciate the input but I don't want to strip out all versions of Java. My process is to install the latest version of Java then strip out the previous versions. That way, each machine always has a version of Java (just in case the user tries to use something that runs on Java in the short time the installs / uninstalls are happening).
      • This content is currently hidden from public view.
        Reason: Removed by member request For more information, visit our FAQ's.
    • This seems to have fixed my troubles. I think I can modify it to use for removing other programs too. Thanks!
      • yes, it does the following:
        Go through the registry and check for a like name, then run the uninstallation routine for it (it is the same like msiexec /x {ID} /qn
        But it takes it live.
        My Java installation routine is:
        Remove all old Java installations and install the new one as only one.
  • This content is currently hidden from public view.
    Reason: Removed by member request For more information, visit our FAQ's.
  • Is there any way I can run this silently? My users are getting a pop up box asking them if they want to install. I want zero user intervention.
    • the uninstall or the install?
      • The uninstall but I got it to work. I was also doing an @echo off and some echo's in the cmd file. I removed those and it's working great.

All Answers

0

Hi All,


I guess you are using "Online KScript" and I have something a little different. It works fine for me. It uninstalls the Java 8U60 and installs 8U65 for x86. Please try the following.

"Online Shell Script"

* Enabled

* Windows Run As: Local System
* Notify Users: unchecked
* Schedule: None

Dependencies: jre1.8.0_65_x86.msi

Script:

REM 8U60 x86^
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218060F0} /qn /qb- /norestart

MsiExec.exe /I jre1.8.0_65_x86.msi /qn /qb- /norestart AUTOUPDATECHECK=0 IEXPLORER=1 MOZILLA=1 REBOOT=Suppress JAVAUPDATE=0 EULA_ACCEPT=YES



Answered 10/30/2015 by: efessun
White Belt

Don't be a Stranger!

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

Sign up! or login

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