2 Replies Latest reply: Jan 15, 2013 2:33 PM by 984793 RSS

    Hiding the system tray icon in Java 7 Update 11 MSI deployment

    985018
      Hi all,

      I'm preparing a MSI package to deploy via SCCM 2007 of the latest Java 7 Update 11 32-bit package.

      There used to be an old property that we can set called SYSTRAY, but that does not work anymore...
      I've also tried applying the following concept of registry key modification that worked in version 6, but once again, not working on the new version:
      [HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Plug-in\1.7.0_11]
      "HideSystemTrayIcon"=dword:00000001

      Using Process Monitor, I can see that Java attempts to make changes in the HKCU keys, but no matter if I enable or disable it, the only key that seems to be affected is this and is set to true in both instances:
      HKCU\Software\JavaSoft\DeploymentProperties\deployment.system.tray.icon

      Anyone know how to disable the tray icon properly?

      Many thanks.
        • 1. Re: Hiding the system tray icon in Java 7 Update 11 MSI deployment
          985018
          After some more tinkering, I have finally figured it out.
          For those that are attempting to package it, here's the answer:

          This key actually still works and seems to be the only way to hide the tray in Java 7:
          [HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Plug-in\1.7.0_11]
          "HideSystemTrayIcon"=dword:00000001

          Java now stores the user preferences in a file per user basis here:
          C:\Documents and Settings\%USER NAME%\Application Data\Sun\Java\Deployment\deployment.properties

          Simply adding an active setup into the transform of the MST to delete that file does the trick. Java in itself will re-create it.

          The reason why you might want to do that is simply because the file is left behind from previous installs, and will keep all previous preferences (in my case, my tray icon was left to on, and no matter what registry key I changed, it would stay on until I delete the file and let Java recreate it using my default deployment settings).

          Hopefully someone else packaging Java for deployment can find this info useful. :)
          • 2. Re: Hiding the system tray icon in Java 7 Update 11 MSI deployment
            984793
            Thanks for posting the solution!

            I've been successful in hiding the icon via this registry key
            [HKEY_USERS\defuser\Software\AppDataLow\Software\JavaSoft\DeploymentProperties]
            "deployment.system.tray.icon"="false"