Quantcast
Channel: The Techie Bit » Download
Viewing all articles
Browse latest Browse all 3

Java Next Generation Plug-in

$
0
0

I’m not sure whether this really effects everyone, but the next generation plugin was found to cause us difficulties after java had already been deployed. Therefore I needed to come up with a solution that could rolled out to everyone as needed. Again that great tool wItem Installer came into play. This time I have also used another tool called Bat to Exe convertor, which enabled me to package a few commands into an exe ignoring the result status. (this was needed as trying to kill a process which doesn’t exist caused the msi to fail if it wasn’t within an exe).

I’ll run through the steps needed to make a successful package with the settings I used.

Unfortunately changing Java to use the old plug-in, didn’t just require a small registry change, it needed multiple registry changes and also running a command as the logged on user.

What needed to be done:

Registry changes:

The following section configures the registry to point to the ssv.dll (the old plug-in)

[HKEY_CLASSES_ROOT\CLSID\{CAFEEFAC-0016-0000-FFFF-ABCDEFFEDCBA}\InprocServer32]
@="C:\\Program Files\\(path to java build 21)\\jre6\\bin\\ssv.dll"
[HKEY_CLASSES_ROOT\CLSID\{CAFEEFAC-0016-0000-0021-ABCDEFFEDCBC}\InprocServer32]
@="C:\\Program Files\\(path to java build 21)\\jre6\\bin\\ssv.dll"
[HKEY_CLASSES_ROOT\CLSID\{CAFEEFAC-0016-0000-0021-ABCDEFFEDCBB}\InprocServer32]
@="C:\\Program Files\\(path to java build 21)\\jre6\\bin\\ssv.dll"
[HKEY_CLASSES_ROOT\CLSID\{CAFEEFAC-0016-0000-0021-ABCDEFFEDCBA}\InprocServer32]
@="C:\\Program Files\\(path to java build 21)\\jre6\\bin\\ssv.dll"

The following registry edit seems to purely change the status of the tick in the box for ‘Enable the next-generation Java plug-in’ in the java console 0= un-ticked, 1=ticked.

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Plug-in\1.6.0_21]
"UseNewJavaPlugin"=dword:00000000

Command to run:

Then the following command must be run as the current user, NOT the system account (this may change in the future, but that is the only way I could get it to work currently).

c:\(path to java)\ssvagent.exe -high -jpisetup -old

NB: all of the above was tested and used with Java JRE 1.6.0_21, but theoretically should work with any newish version as long as the highlighted parts are changed accordingly. I’m currently testing it with build 22.

In testing I found that the above command wouldn’t complete successfully unless Internet Explorer was not running. To kill the iexplore.exe process, I used the following command:

‘%WinDir%\System32\taskkill.exe /IM iexplore.exe /T /F’

How was this packaged into an MSI installer which would work with SCCM:

Well as many people may not have access to InstallShield or similar, I have ran through this using wItem Installer.

The registry settings are obvious as you just add them. But running the commands although should be simple, for me they weren’t. This was due to error code issues, for example if you add the ‘kill IE’ command and IE isn’t running, it reports to SCCM that it failed, which in turn marks the whole installation as failed. I couldn’t find a way to manipulate the taskkill command to give the status codes I wanted, so I needed to find a different way to run them, if I wanted the right result passed back to SCCM. I eventually thought about running separate chained batch files, and whilst browsing the web for ideas, stumbled upon ‘bat to exe convertor’ immediately I thought I had landed on a great quick ‘fix’, and I had.

I popped each command into its own batch file, then converted it to an exe. I then took each exe and attached it to the install as a ‘run exe attached to installation’ This means, that the status code of each command will be ignored and therefore the install should always complete successfully if each command is able to run.

I hope to think of a neater way to do this in the future, but it works so I happy for the time being.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images