This post is purely based on the guidelines provided by Geertjan Wielenga https://blogs.oracle.com/geertjan/entry/installing_the_jre_via_an
These below assume that (1) you are creating your installer on Windows and (2) you’d like your installer to be used on Windows only.
The only way to hide menu items is to add the entries to your layer file. To add a layer file to your module you’ll need to
Create a new xml file called layer.xml in any package in your module.
Register the new layer file in your Module Manifest file (under the Important Files node) using the following pattern