OK here we go...

How to do the following:

1. detect if Java is installed
2. if 1 above is true, add the Java VMs path to %PATH% without disturbing anything else
3. if 1 is not true offer to install java (from an EXE included in the installer)
4. if 3 above is needed, do 3 thus making 1 above true, then do 2.
5. once all of that's done, install files based on user's selection of components. (basically proceed as normal)

A department withing my company still uses applications which require a java VM and we've lost track of which machines have it, which machines don't and on top of that, recent Java installers don't add it to the %PATH% which breaks older applications

thanks for the help in advance.