Unattended Java installation

As our Lotus Notes based helpdesk system needs java installed to work properly we needed to install Java on all the customer machines. Eventually I managed to get the unattended installation working by using the following command.
   pathtoexe.exe /s /v”/qn ADDLOCAL=ALL /L %temp%\javasetup.log REBOOT=Suppress”
Note that the space and case is critical. My next step is to work out how to tell if the software is already installed and only do the above step if it isn’t. Should be fairly easy to do just not had a chance to look at it yet.