Hi guys,

Have had no problems uninstalling old Java and installing new Java until version 8.
As 7 is going EoL, I have to roll out Java 8 to 300 Windows 7 workstations via our K1000.

Currently using a batch file that calls wmic to uninstall any previous versions of java, and then runs the 32-bit offline installer with custom configs (see below).

wmic product where "name like 'Java%%'" call uninstall
"jre-8u40-windows-i586.exe" INSTALL_SILENT=1 STATIC=0 AUTO_UPDATE=0 WEB_JAVA=1 WEB_JAVA_SECURITY_LEVEL=H WEB_ANALYTICS=0 EULA=0 REBOOT=0 NOSTARTMENU=0 SPONSORS=0

The uninstall process still works fine, however the .exe install seems to fail. I can see the process run for a split second on my target machine, but then nothing else. When I run it locally (just double-clicking the batch file and approving the UAC prompt), it installs fine. Is there an issue with the latest Java installing under the SYSTEM account (which I assume the K1000 uses to install)?
I've tried extracting and using the MSI but I get "Error 1722. There is a problem with this Windows Installer package."

Any help would be greatly appreciated.

Cheers,
Tim
Answer Summary:
Cancel
2 Comments   [ + ] Show Comments

Comments

  • See this blog. http://dptechjournal.blogspot.com/2015/04/deploy-java-18-with-msi-enterprise.html
  • I have similar situation with java 1.8 update 40 , I am using executable and i could able to install manually but when i try to install through SCCM i have issues especially on 64 bit windows 7 machines , It will not install through SCCM and i am using below switches. please let me know if there is a workaround for this.

    /s /L "C:\Windows\Temp\Java1.8.45.log" REBOOT=0 WEB_ANALYTICS=0 AUTO_UPDATE=0 NOSTARTMENU=1 SPONSORS=0 WEB_JAVA=1
    I also tried with out out log and also tried to copy java.settings.cfg under C:\ProgramData\Oracle\Java\ but no luck.
Please log in to comment

Answer Chosen by the Author

1
Thanks to aragorn.2003 and SMal.tmcc, finally got this working!!
I added the start /wait to the batch file after the wmic, and added the .mst to the extracted .msi and it now works as a deployed managed install!

My full script is below:
wmic product where "name like 'Java 7%%' or name like 'Java 8%%'" call uninstall
start /wait msiexec.exe /i jre1.8.0_40.msi /t java8u40.mst JU=0 JAVAUPDATE=0 AUTOUPDATECHECK=0 RebootYesNo=No WEB_JAVA=1 /qn /L*v %TEMP%\jre8u40.log

Cheers to everyone who commented, what a nightmare!
-Tim
Answered 03/11/2015 by: onionst
White Belt

Please log in to comment

Community Chosen Answer

4
This installer seems to reference a file called java.settings.cfg and since it didn't exist our installer was failing. Creating an empty dummy file fixed the problem for us.
IF NOT EXIST "%ALLUSERSPROFILE%\Oracle\Java" MKDIR "%ALLUSERSPROFILE%\Oracle\Java"
IF NOT EXIST "%ALLUSERSPROFILE%\Oracle\Java\java.settings.cfg" @ECHO.>"%ALLUSERSPROFILE%\Oracle\Java\java.settings.cfg"
Answered 03/10/2015 by: SDNBTP
Third Degree Blue Belt

Please log in to comment

Answers

2
Just tested that on my machine and I think your problem is the wmic uninstall takes several minutes to run.  since you are not using start /wait in your batch file Java 8u40 is getting installed then since wmic is still running, it gets uninstalled immediately.

wmic product where "name like 'Java 7%%' or name like 'Java 8%%'" call uninstall
start /wait jre-8u40-windows-i586.exe INSTALL_SILENT=1 STATIC=0 AUTO_UPDATE=0
WEB_JAVA=1 WEB_JAVA_SECURITY_LEVEL=H WEB_ANALYTICS=0 EULA=0 REBOOT=0
NOSTARTMENU=0 SPONSORS=0

Answered 03/05/2015 by: SMal.tmcc
Red Belt

  • it took wmic 10 minutes to run on my machine
  • I did this as a managed install.
    • Thanks mate, tried everything you said but still couldn't get it to install properly - I get the same issues as previous with the process showing up briefly but then disappearing with no install.
Please log in to comment
1
Offhand, I'd say try putting the arguments in quotes as well.  Something like this:

"jre-8u40-windows-i586.exe" "INSTALL_SILENT=1 STATIC=0 AUTO_UPDATE=0 WEB_JAVA=1 WEB_JAVA_SECURITY_LEVEL=H WEB_ANALYTICS=0 EULA=0 REBOOT=0 NOSTARTMENU=0 SPONSORS=0"

If that doesn't work, try putting the whole string in the same set of quotes.

Past that, you can run your install command in PSexec to test whether or not it's a permissions issue: https://support.software.dell.com/k1000-systems-management-appliance/kb/111788

if it doesn't run in PSexec, switch to an online kscript and use the run as feature to provide administrator credentials.
Answered 03/05/2015 by: jknox
Red Belt

  • This seems to get it closest to working - if I select the "Wait for completion" option when using my administrator credentials it will install, but only after you click Yes on a UAC prompt.
    Same thing happens when I do the PSExec test, displays a UAC prompt which I find quite odd!
    Still doing more testing to see if I can get around it.
    Thanks for your help, will keep you updated!
  • This content is currently hidden from public view.
    Reason: Removed by member request
    For more information, visit our FAQ's.
  • Nevermind, i found it:
    http://docs.oracle.com/javase/7/docs/webnotes/install/windows/jre-installer-options.html

    All java silent install switches
Please log in to comment
1
You can also extract the downloaded .exe file. Just execute the file and look under %LOCALAPPDATA%Low\Sun\Java\jre1.8.0_40 or %LOCALAPPDATA%Low\Sun\Java\jre1.8.0_40_x64 to find a msi. now you can deploy the msi using the following command.

msiexec /i "%~dp0\jre1.8.0_40.msi" JU=0 JAVAUPDATE=0 AUTOUPDATECHECK=0 RebootYesNo=No WEB_JAVA=1 /qn /L*v %TEMP%\jre8u40.log
Answered 03/06/2015 by: aragorn.2003
Red Belt

  • %~dp0 includes the trailing backslash so your command line would be look like this: 'msiexec /I some_path\a_folder\\jre1.8.0_40.msi... etc.
  • Thanks mate, but as stated in my original post, extracting this .msi and then trying to run it gives me the 1722 error.
    • After extracting the msi use Orca to edit .msi and create .mst.

      Open the table “CustomAction” and select the row “installexe”. Change the value in the field “Type” to 3074 (or Hex 0x0C02). This will set the NoImpersonate bit.
Please log in to comment
1
I have similar situation with Java 1.8 Update 40 , I am trying to install it manually it worked on both 32 bit and 64 bit machines but when I tried to install through SCCM , it will install on 32 bit machines but not on 64 bit machines(Windows 7) I see error exit 3 some times in the execmgr.log. can any one tell why its failing through SCCM in 64 bit machines. 

This is the commands i am using 

 REBOOT=0 WEB_ANALYTICS=0 AUTO_UPDATE=0 NOSTARTMENU=1 SPONSORS=0 WEB_JAVA=1

I also tried to copy java.settings.cfg(empty file ) file under C:\ProgramData\Oracle\Java but still no luck
Answered 05/11/2015 by: innovateus
White Belt

Please log in to comment
1

>extracting this .msi and then trying to run it gives me the 1722 error.
Ultimately, this is all that 'jre-8u40-windows-i586.exe' is doing so the end result will be the same.

Remember that the JRE MSI isn't a 'proper' MSI. Clearly, the finer points of packaging continue to elude the folks at Oracle so they just compress the installing EXE into the Binary table, extract, then run it. Yup, that's right: an EXE (jre-8u40-windows-i586.exe) which extracts an MSI which then extracts and executes another EXE (installer.exe). Awesome thinking behind that one...

1722 is telling you that the Custom Action which performs this execution failed. Your only option with this brain-dead set-up is to ProcMon it as it goes to see why it's failing. My money's on permissions.

Answered 03/10/2015 by: VBScab
Red Belt

  • ProcMon doesn't show any Access Denied errors - I can see a few Path Not Found and some Name Not Found results... could this be affecting it?
Please log in to comment
1
There's an issue with runnning this version of Java as an MI:
https://support.software.dell.com/k1000-systems-management-appliance/kb/149248


Answered 03/23/2015 by: brucegoose03
Second Degree Black Belt

  • Hi All,

    Im trying to install two different McAfee packages but both are same version with different configuration, one frame pkg for Region1 and another for Region 2, how i can do this MI ?

    when I create new managed install im able to associate only one file at a time, any idea how can i perform this ? as i need to perform the two installation with different configuration at a time..I have zipped both the frame pkgs, and trying to call as below

    Managed Install 1:

    Override Default Installation
    Full Command Line:
    FramePkg1.exe FRAMEPKG /INSTALL=AGENT/SILENT

    Managed Install 2:
    Override Default Installation
    Full Command Line:
    FramePkg2.exe FRAMEPKG /INSTALL=AGENT/SILENT

    would this work?
    • You can zip them up. MI's will auto-unzip your files for you.
      • Full Command Line:
        FramePkg2.exe FRAMEPKG /INSTALL=AGENT/SILENT

        is this command correct?
    • I'd be trying labels for your issue mate, sounds like you need to sort your machines by region first and then you can create the managed install (deselect only display records with an associated file).
Please log in to comment
0
I have similar situation with java 1.8 update 40 ,  I am using executable and i could able to install manually but when i try to install through SCCM i have issues especially on 64 bit windows 7 machines , It will not install through SCCM and i am using below switches. please let me know if there is a workaround for this.

 /s /L "C:\Windows\Temp\Java1.8.45.log" REBOOT=0 WEB_ANALYTICS=0 AUTO_UPDATE=0 NOSTARTMENU=1 SPONSORS=0 WEB_JAVA=1
I also tried with out out log and also tried to copy java.settings.cfg under C:\ProgramData\Oracle\Java\ but no luck.

 
Answered 05/11/2015 by: innovateus
White Belt

Please log in to comment
0

Are you sure that the transform is being applied? The '/T' switch is only used when advertising an application. To apply at installation time, you need to use the special property TRANSFORMS, as in:

 msiexec.exe /i "%~DP0jre1.8.0_40.msi" TRANSFORMS="%~DP0java8u40.mst"
Answered 03/11/2015 by: VBScab
Red Belt

  • Not sure if it's being applied, but the install pushes out without any errors, so I'm stoked!
    • I use the MSI and created the MST with ORCA but get a 1603 error. If I run the MSI interactively I get an error about a missing file. If I use jre-8u40-windows-i586.exe it installs okay.
      • If you can use the .exe - I'd stick to that. Never had any problems with it previously until this version, which is why I've had to go the .msi/.mst route!
Please log in to comment
Answer this question or Comment on this question for clarity

Share