The pain of Custom Java deployment ! Heres a quick and easy guide so you can have ( Dsiabled Updates , Start menu removed , Medium Security set)


1.) First things first download the latest Java version .exe and extract the MSI

When Welcome to Java window appears do not click Install button and navigate to LocalAppData folder (the user Application Data folder). The location of the LocalAppData folder differs for each Windows platform.

Note: You can also navigate directly to APPData folder by typing : %APPDATA% in Windows Explorer Address Bar or Run.

2.) Download the latest version of Orca

3.) open the Java MSI in orca and click Transform > new Transform

4.) under the "Property table" change the following PROPERTIES


(Now save the transform file)

5.) create two files Deployment.config and deployment.properties

copy the original settings from your user profile deployment.properties into the new deployment.properties

and add the following


inside the deployment.config put the following


6.) Create the following VBS ( call it script.vbs )

'Option Explicit
'On Error Resume Next
dim strJavaPath
set wshShell = CreateObject("WScript.shell")
set scrFilesystem = CreateObject("Scripting.FileSystemObject")
Set objFSO = CreateObject("Scripting.FileSystemObject")
strJavaPath = wshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\ CurrentVersion\Explorer\Shell Folders\Common Programs") & "\Java"
if scrFileSystem.FolderExists(strJavaPath) then
end if
strSource = "\\servername\packages\Java Runtime Environment\JRE 7.0 u51\"
strDest = "C:\WINDOWS\Sun\Java\Deployment\"
For Each strFileName In Array("Deployment.config","Deployment.properties")
objFSO.CopyFile strSource & strFileName, strDest,True


7.) Now we need to modify the MSI ( or you can do it via a transform file again ! ) ( thanks for the steps martinkasabov @ Edugeek )

1. Go to "Binary" table, add row: give <NAME> and for Data [Binary Data]:
... Browse to the "script.vbs" File > OK
(The script will now be embedded into the MSI)
(No need to provide it w/ the installer when deployed)

2. Go to "CustomAction" Table > Add a row:
- Action > Give it a <TITLE>;
- Type > ENTER "6" without the Quotations!
(Type 6 = VBScript file stored in a Binary Table stream)
- Source > Type the <NAME> value from the Binary Table!
- Target > NULL (Leave Blank)!

3. Go to "InstallExecuteSequence" Table > Add a row:
- Action > Type the <TITLE> value from the CustomAction Table!
- Condition > ENTER "Not Installed" without the quotations!
- Sequence > ENTER "-1" without the quotations!
(msiDoActionStatusSuccess = -1)
(Successful completion)
(Used with Exit dialog boxes)

*It means it will be applied just before the MSI Exits
upon successful installation...


8.) Now the MSI and transform is complete you can use the following code to execute

msiexec /i "jre1.7.0_51.msi" TRANSFORMS="JU.mst" /qn