Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom deployment of Java JRE via gpo/msi?

Status
Not open for further replies.

Leozack

MIS
Oct 25, 2002
867
GB
I'm not sure where on tektips to talk about software deployment via GPO's pushing out MSI's and tweaking the deployment packages so I'm posting here :p

I've not managed to get a java runtime package to deploy properly to date and as a commonly needed thing it's pretty annoying. All I want to do is deploy it via msi, but have it set to turn off & disable autoupdates, disable the tray icon, and not start the console. I've tried all sorts of reg entries & deploy.config file things and so on, but still I can't get just a simple msi file needing no intervention that will leave all users with these settings on those PCs.

Can anyone help? Or does anyone have a better place to ask about msi deployment & tweaks etc? :) I don't have use of MS SMS

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
You should be able to do all of this in the MSI using Orca (free download from MS as part of the Windows SDK). I've deployed several different version of Java with very little issue. A good website to check out is - this will have KB's FAQ's etc on loads of different applications, including Java

Good Luck :)

Irish Poetry - Karen O'Connor
Irish Poetry and Short Stories - Doghouse Books
Garten und Landschaftsbau
 
It seemed to me appdeploy dried up over the last few years, which was a shame due to the amount of raw information available - though it is often a lot to search through for just 2 program, with both mst solutions, batch solutions, and so on all competing for your attention :)

I spent some more time today making another mst for java which puts the regfiles necessary into the JRE location and also the update policy location.

However - I still can't find how to stop the java console from starting (options / advanced / java console / don't start java console) via an mst altering the registry.

I also forgot to check whether my mst regedits effected it enough so opening java in control panel had the desired options set (no updates and no tray icon) as sometimes what seems like valid reg settings are ignored when you open the java control panel?

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
After much hard work I've ended up mixing a couple of regedits (could be done in an .mst but I've not bothered) with java's apparently needed properties files which I've relied on until now but needed the reg entries too. So - my install file looks like this (the msi being installed is called jre1.6.0_07.msi)
Code:
IF NOT EXIST %WINDIR%\SUN\Java\Deployment md %WINDIR%\SUN\Java\Deployment

copy deployment.config %WINDIR%\SUN\Java\Deployment /y
copy jre.properties %WINDIR%\SUN\Java\Deployment /y

msiexec.exe /i "jre1.6.0_07.msi" /passive /norestart ADDLOCAL=ALL IEXPLORER=1 REBOOT=Suppress

:Configure Plug-In
reg add "HKLM\SOFTWARE\Javasoft\Java Plug-in\1.6.0_07" /v UseJava2IExplorer /t reg_dword /d 1 /f
reg add "HKLM\SOFTWARE\Javasoft\Java Plug-in\1.6.0_07" /v HideSystemTrayIcon /t reg_dword /d 1 /f

:Disable Updates
reg add "HKLM\SOFTWARE\Javasoft\Java Update\Policy" /v EnableJavaUpdate /t reg_dword /d 0 /f

:Delete from Run Key
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v SunJavaUpdateSched /f
If you don't want to watch the progress dialog you can add the /quiet switch at the msi call aswell as passive & norestart.
The not-often-mentioned-yet-crucial properties files (which unlike the reg entries, ARE applied) are these :
deployment.properties
Code:
#deployment.properties
deployment.browser.vm.iexplorer=true
deployment.browser.vm.mozilla=false
deployment.version=6.0
deployment.console.startup.mode=DISABLE
deployment.system.tray.icon=false
deployment.capture.mime.types=true
deployment.browser.path=C\:\\Program Files\\Internet Explorer\\IEXPLORE.EXE
#Java Web Start jre's
#Java Plugin jre's
deployment.javapi.jre.1.6.0_07.args=
deployment.javapi.jre.1.6.0_07.osname=Windows
deployment.javapi.jre.1.6.0_07.path=C\:\\Program Files\\Java\\jre1.6.0_07
deployment.javapi.jre.1.6.0_07.osarch=x86
jre.properties
Code:
deployment.version=1.6.0
deployment.console.startup.mode=DISABLE
deployment.console.startup.mode.locked
deployment.browser.vm.iexplorer=true
deployment.browser.vm.iexplorer.locked
deployment.browser.vm.mozilla=false
deployment.browser.vm.mozilla.locked
deployment.javaws.shortcut=NEVER
deployment.javaws.shortcut.locked
deployment.javaws.associations=ASSOCIATION_NEVER
deployment.javaws.associations.locked
deployment.javaws.autodownload=NEVER
deployment.javaws.autodownload.locked
deployment.system.tray.icon=false
deployment.system.tray.icon.locaked
deployment.security.expired.warning=false
deployment.security.expired.warning.locked
deployment.security.askgrantdialog.show=true
deployment.security.askgrantdialog.show.locked
These windows folder based deployment options are copied to local deployment sources for each user in %appdata%\Sun\Java\Deployment if you want to copy them to a specific or current user. New users should pick them up from the windows location you just copied them to before installing.

Obviously when changing java version numbers, various parts of the above need to be changed to match.

Remember to change things to suit your own requirements - mine were :
* no updates
* no showing the system tray icon
* no starting the console, hidden or otherwise

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top