Hi Tris Setiawan,
Welcome to MSDN.
First I wonder why your .net application need Java Runtime Environment?
Second, once you right click the setup file to run as administrator, your code will have administrator privilege to do some action such as copying files to a special folder. But since MSI does not allow to start another process during installation, so the installer won’t allow you to install JRE.
If I misunderstood your meaning, please feel free to tell me.
Sincerely,
Kira Qian