GPO install of JRE with "STATIC" option
This article--
http://java.sun.com/javase/6/docs/technotes/guides/jweb/otherFeatures/jre_install.html
--describes Java's new "patch-in-place" behavior. This works great for workstations, where you have few, if any Java applications looking for specific versions. But on servers, where we tend to have Java apps that break when Java is upgraded, I'd just as soon leave the old version behind until I am certain I don't need it. (That used to be easy...!)
The "Static" installation is supposed to provide for this. On the command line, one apparently appends STATIC=1.
But I'm trying to create a GPO that will use an MST to do a Static installation...so far without success. In my MST, in the Property Table, I've created a new Property named STATIC whose Value is 1, and I've applied it as a Modification in the GPO. That isn't working; I keep getting a Patch-In-Place install. I'm currently working with the 1.6u11 MSI...want to get that made Static before installing 1.6u12.
Anybody cracked this yet?
TIA
http://java.sun.com/javase/6/docs/technotes/guides/jweb/otherFeatures/jre_install.html
--describes Java's new "patch-in-place" behavior. This works great for workstations, where you have few, if any Java applications looking for specific versions. But on servers, where we tend to have Java apps that break when Java is upgraded, I'd just as soon leave the old version behind until I am certain I don't need it. (That used to be easy...!)
The "Static" installation is supposed to provide for this. On the command line, one apparently appends STATIC=1.
But I'm trying to create a GPO that will use an MST to do a Static installation...so far without success. In my MST, in the Property Table, I've created a new Property named STATIC whose Value is 1, and I've applied it as a Modification in the GPO. That isn't working; I keep getting a Patch-In-Place install. I'm currently working with the 1.6u11 MSI...want to get that made Static before installing 1.6u12.
Anybody cracked this yet?
TIA
0 Comments
[ + ] Show comments
Answers (9)
Please log in to answer
Posted by:
anonymous_9363
15 years ago
- Does the MSI/MST combination work OK stand-alone?
- Enable MSI Logging on a target and see if the transform is applied during deployment. It wouldn't be the first time I've seen MSTs being ignored for a GP deployment. If it's not being applied, forget trying to edit the GP: just delete it and create a new one.
- Enable MSI Logging on a target and see if the transform is applied during deployment. It wouldn't be the first time I've seen MSTs being ignored for a GP deployment. If it's not being applied, forget trying to edit the GP: just delete it and create a new one.
Posted by:
JRV
15 years ago
I still get a "Family" install when I use my MST interactively via MSIEXEC command line, so I believe that's where the problem lies. No errors in the GUI or Event log, but no "Static" install, either.
So my initial guess as to what had to be in the MST (see my first post) was wrong. Any idea what's supposed to be in the MST to make it work? I've not found it on Sun's site, nor by Googling.
So my initial guess as to what had to be in the MST (see my first post) was wrong. Any idea what's supposed to be in the MST to make it work? I've not found it on Sun's site, nor by Googling.
Comments:
-
This may seem like a silly question, but how can you tell how Java is installed on a machine? (consumer, static. family, etc) - roy.urick@koorsen.com 12 years ago
Posted by:
JRV
15 years ago
Posted by:
nheim
15 years ago
Posted by:
JRV
15 years ago
Thanks; good catch!
I got all excited when I read your suggestion and was sure that MODE=S was going to do the trick. I see what you were noticing in the MSI; there's a lot of logic relating to the type of install and the value of MODE; I wasn't able to figure it all out though.
I suspect "S" stands for "Static", "U" for "Upgrade in Place," and "C" for "Consumer", the default being C. But I think there's more to it than just the MODE property, unfortunately.
"MODE=S" did a "C" ("Consumer", not "Static") install when I installed when Java wasn't already installed. If Java of the same version I was installing was already installed, it asked if I wanted to reinstall it. When I clicked Yes, it removed the existing install, and started a new install, but the new install failed. So I think MODE=S is part of the solution, but not all of it.
"MODE=U" wouldn't install at all unless there was a previous version installed (which makes sense), but was definitely an upgrade mode because you couldn't choose where to install it in the GUI.
So at this point, "S" also stands for "Stumped"!
The install log is 542KB; too large to post. Is there a portion of it I could post that would tell someone who knows more about interpreting these things than I do what's going wrong?
Hate having to reverse engineer this. Someone at Sun who knows the MSI could document it in a few minutes.
I got all excited when I read your suggestion and was sure that MODE=S was going to do the trick. I see what you were noticing in the MSI; there's a lot of logic relating to the type of install and the value of MODE; I wasn't able to figure it all out though.
I suspect "S" stands for "Static", "U" for "Upgrade in Place," and "C" for "Consumer", the default being C. But I think there's more to it than just the MODE property, unfortunately.
"MODE=S" did a "C" ("Consumer", not "Static") install when I installed when Java wasn't already installed. If Java of the same version I was installing was already installed, it asked if I wanted to reinstall it. When I clicked Yes, it removed the existing install, and started a new install, but the new install failed. So I think MODE=S is part of the solution, but not all of it.
"MODE=U" wouldn't install at all unless there was a previous version installed (which makes sense), but was definitely an upgrade mode because you couldn't choose where to install it in the GUI.
So at this point, "S" also stands for "Stumped"!
The install log is 542KB; too large to post. Is there a portion of it I could post that would tell someone who knows more about interpreting these things than I do what's going wrong?
Hate having to reverse engineer this. Someone at Sun who knows the MSI could document it in a few minutes.
Posted by:
JRV
15 years ago
I installed using Sun's .exe file with the STATIC=1 argument. It did, indeed, install in Static mode.
I examined the large MST file that was dropped in %TEMP%. Most of its contents seemed to relate to Sun's various advertising partners...Yahoo, OpenOffice, Live Search, etc. There were 3 Tables (Control, ControlCondition, and ControlEvent) that I could not examine because DEP closed ORCA each time I tried. But in Property, MODE was "C"! In fact, the only changes in Property appeared to relate to sponsors, whether IE5 was found, and localization. Hmmmm....
So, on the same computer, I uninstalled JRE and then reinstalled it using MSIEXEC, the MSI, and the transform that the .EXE package had dropped. I got a "Consumer" install. So I'm guessing that their .EXE is doing something outside of MSIEXEC and/or passing arguments to MSIEXEC. Hopefully the latter or I'm wasting my time.
Following are the 2 lines in the log that contain the text "Command Line". I'm not an MSI expert (yet!) but these seemed the most likely log entries; if there's something else I should look for please let me know.
Does anything jump out at you that suggests it might be the properties I'm looking for? I know from examining the MST that SP's are Sponsors, so I think we can ignore them.
By the way, the value of MODE in the Registry after the install, and in the MSI log, is S. So we are on the right track with that. It's just being done through a command line switch.
[hr]
[Edit]Let me save people the trouble of a reply: I need to run the same JRE .EXE in "Consumer" (default) mode with logging enabled, and compare the Command Line: log entries with what I posted above. The delta should be what I have to put in the MST. Duh. It hit me in a moment of clarity that occurred when most such moments do: At about 4AM when I woke up and couldn't get back to sleep! Might be next week before it happens though.
I examined the large MST file that was dropped in %TEMP%. Most of its contents seemed to relate to Sun's various advertising partners...Yahoo, OpenOffice, Live Search, etc. There were 3 Tables (Control, ControlCondition, and ControlEvent) that I could not examine because DEP closed ORCA each time I tried. But in Property, MODE was "C"! In fact, the only changes in Property appeared to relate to sponsors, whether IE5 was found, and localization. Hmmmm....
So, on the same computer, I uninstalled JRE and then reinstalled it using MSIEXEC, the MSI, and the transform that the .EXE package had dropped. I got a "Consumer" install. So I'm guessing that their .EXE is doing something outside of MSIEXEC and/or passing arguments to MSIEXEC. Hopefully the latter or I'm wasting my time.
Following are the 2 lines in the log that contain the text "Command Line". I'm not an MSI expert (yet!) but these seemed the most likely log entries; if there's something else I should look for please let me know.
Does anything jump out at you that suggests it might be the properties I'm looking for? I know from examining the MST that SP's are Sponsors, so I think we can ignore them.
Command Line: TRANSFORMS=\\<snip>\Application Data\Sun\Java\jre1.6.0_12\sp1033.MST PREFERENCEORDER=SP8;SP4 ED=0 SP1OFF=1 SP2OFF=1 SP3OFF=1 SP5OFF=1 SP9OFF=1 MSDIR=ms4 SPWEB=http://javadl-esd.sun.com/update/1.6.0/sp-1.6.0_12-b04 COUNTRY=US METHOD=joff-s CURRENTDIRECTORY=\\<snip> CLIENTUILEVEL=0 CLIENTPROCESSID=5424
Command Line: TARGETDIR=C:\ ALLUSERSPROFILE=C:\ JAVA=C:\Program Files\Java\ INSTALLDIR=C:\Program Files\Java\jre1.6.0_12\ USERPROFILE=C:\ SP9=0 SP5=0 SP4=0 SP3=0 SP1=0 ITANIUM=Quad-Core AMD Opteron(tm) Processor 2344 HE MSVCRT=C:\WINDOWS\system32\msvcrt.dll ARPREADME=C:\Program Files\Java\jre1.6.0_12\README.txt IEXPLORER=1 ODB=\\<snip>\Application Data\Sun\Java\jre1.6.0_12\jre1.6.0_12.msi SEMICOLON=1 IE55FOUND=C:\Program Files\ ADVANCED=1 SP2=0 TRANSFORMS=|\\<snip>\Application Data\Sun\Java\jre1.6.0_12\sp1033.MST TRANSFORMSSECURE=1 TRANSFORMSATSOURCE=1 PREFERENCEORDER=SP8;SP4 ED=0 SP1OFF=1 SP2OFF=1 SP3OFF=1 SP5OFF=1 SP9OFF=1 MSDIR=ms4 SPWEB=http://javadl-esd.sun.com/update/1.6.0/sp-1.6.0_12-b04 COUNTRY=US METHOD=joff-s CURRENTDIRECTORY=\\<snip> CLIENTUILEVEL=0 CLIENTPROCESSID=5424 USERNAME=<snip> COMPANYNAME=<snip> SOURCEDIR=\\<snip>\Application Data\Sun\Java\jre1.6.0_12\ ACT
By the way, the value of MODE in the Registry after the install, and in the MSI log, is S. So we are on the right track with that. It's just being done through a command line switch.
[hr]
[Edit]Let me save people the trouble of a reply: I need to run the same JRE .EXE in "Consumer" (default) mode with logging enabled, and compare the Command Line: log entries with what I posted above. The delta should be what I have to put in the MST. Duh. It hit me in a moment of clarity that occurred when most such moments do: At about 4AM when I woke up and couldn't get back to sleep! Might be next week before it happens though.
Posted by:
JRV
15 years ago
Ran an install of the Consumer and Static options both using the /PASSIVE argument to eliminate the Setup wizard and chance of introducing irrelevant variations, and reduce the size of the resulting MSIEXEC log.
One command line went away completely with the /PASSIVE option. Here was the difference in the remaining command line (each argument on a separate line for readability)
TRANSFORMS=<snip>\sp1033.MST
PREFERENCEORDER=SP8;SP4
ED=0
SP1OFF=1
SP2OFF=1
SP3OFF=1
SP5OFF=1
SP9OFF=1
MSDIR=ms4
SPWEB=http://javadl-esd.sun.com/update/1.6.0/sp-1.6.0_12-b04
COUNTRY=US
REBOOTPROMPT=S
METHOD=joff-s
CURRENTDIRECTORY=<snip>
CLIENTUILEVEL=2
CLIENTPROCESSID=1304
Most (maybe all?) relate to the Sponsors in sp1033.mst. Regardless, I tried creating ReverseEngineered.MST with all of the above added to the Property table, except CLIENTPROCESSID and CURRENTDIRECTORY, and ran the MSI with TRANSFORMS=SP1033.MST;ReverseEngineered.MST. No change.
Tried again with the options that weren't obviously SP-related: ED=0 and METHOD=joff-s, and without using the SP MSI. No go, here, either.
I guess I can install using a Startup Script on servers using the .EXE installer and STATIC=1 argument, instead of using an MSI/MST install...but that's SOOOO ugly! But I'm at a dead-end, here. Hope someone else has some ideas.
[Edit] I've filed an RFE on bugs.sun.com requesting that they document using MSTs to achieve a Static install.
[Edit2] ...and here it is: Please document settings needed for a STATIC install using MSI. As per Sun's usual practice, JRE corporate deployment is considered an unimportant nuisance, and it has therefore been accorded Sun's highest honor: A "5-very low" priority. If you, too, are here to learn how to do this, please consider registering with bugs.sun.com and voting for my bug. Because if you don't, Sun will likely keep it secret indefinitely.
One command line went away completely with the /PASSIVE option. Here was the difference in the remaining command line (each argument on a separate line for readability)
TRANSFORMS=<snip>\sp1033.MST
PREFERENCEORDER=SP8;SP4
ED=0
SP1OFF=1
SP2OFF=1
SP3OFF=1
SP5OFF=1
SP9OFF=1
MSDIR=ms4
SPWEB=http://javadl-esd.sun.com/update/1.6.0/sp-1.6.0_12-b04
COUNTRY=US
REBOOTPROMPT=S
METHOD=joff-s
CURRENTDIRECTORY=<snip>
CLIENTUILEVEL=2
CLIENTPROCESSID=1304
Most (maybe all?) relate to the Sponsors in sp1033.mst. Regardless, I tried creating ReverseEngineered.MST with all of the above added to the Property table, except CLIENTPROCESSID and CURRENTDIRECTORY, and ran the MSI with TRANSFORMS=SP1033.MST;ReverseEngineered.MST. No change.
Tried again with the options that weren't obviously SP-related: ED=0 and METHOD=joff-s, and without using the SP MSI. No go, here, either.
I guess I can install using a Startup Script on servers using the .EXE installer and STATIC=1 argument, instead of using an MSI/MST install...but that's SOOOO ugly! But I'm at a dead-end, here. Hope someone else has some ideas.
[Edit] I've filed an RFE on bugs.sun.com requesting that they document using MSTs to achieve a Static install.
[Edit2] ...and here it is: Please document settings needed for a STATIC install using MSI. As per Sun's usual practice, JRE corporate deployment is considered an unimportant nuisance, and it has therefore been accorded Sun's highest honor: A "5-very low" priority. If you, too, are here to learn how to do this, please consider registering with bugs.sun.com and voting for my bug. Because if you don't, Sun will likely keep it secret indefinitely.
Posted by:
JRV
15 years ago
Finally came back to this, and discovered Sun had posted an explanation on my enhancement request--
http://bugs.sun.com/view_bug.do?bug_id=6826518
The trick is that the .EXE file actually extracts a different MSI file for Static installs than it does for Family installs. To obtain the Static version of the MSI, you run the .EXE file with the STATIC=1 switch. (Seems so obvious now...)
From there, it is the same as for the Family install: Copy the .CAB and the .MSI from C:\Users\[Username]\AppData\LocalLow\Sun\Java\[JREfolder] (Win 6.x folder layout) to the install share on your server, then publish with Group Policy.
I compared the two with an MSI editor I found that can do comparisons and it's pretty trivial. I should be able to turn it into an MST. (Wish the comparison utility would do it for me...)
[Edit]
Tying up the last loose ends for any lurkers:
Thanks to GreenMagnet in this thread--
http://www.appdeploy.com/messageboards/fb.asp?m=55422
--I used MSITRAN.EXE to generate an MST based on the difference between the 2 MSIs.
But in looking into Sun's documentation a little further, I found that at least one of the values applied by the resultant MST varies with each version. Only reason I wanted the MST was to be able to use it with future versions and only have to extract 1 MSI from the JRE EXE. Since that's impossible, I'll extract 2 MSIs as described previously, and be content that I can now deploy both "Static" and "Family" JREs by GPO going forward.
http://bugs.sun.com/view_bug.do?bug_id=6826518
The trick is that the .EXE file actually extracts a different MSI file for Static installs than it does for Family installs. To obtain the Static version of the MSI, you run the .EXE file with the STATIC=1 switch. (Seems so obvious now...)
From there, it is the same as for the Family install: Copy the .CAB and the .MSI from C:\Users\[Username]\AppData\LocalLow\Sun\Java\[JREfolder] (Win 6.x folder layout) to the install share on your server, then publish with Group Policy.
I compared the two with an MSI editor I found that can do comparisons and it's pretty trivial. I should be able to turn it into an MST. (Wish the comparison utility would do it for me...)
[Edit]
Tying up the last loose ends for any lurkers:
Thanks to GreenMagnet in this thread--
http://www.appdeploy.com/messageboards/fb.asp?m=55422
--I used MSITRAN.EXE to generate an MST based on the difference between the 2 MSIs.
But in looking into Sun's documentation a little further, I found that at least one of the values applied by the resultant MST varies with each version. Only reason I wanted the MST was to be able to use it with future versions and only have to extract 1 MSI from the JRE EXE. Since that's impossible, I'll extract 2 MSIs as described previously, and be content that I can now deploy both "Static" and "Family" JREs by GPO going forward.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.