We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

cbaptist
Posts: 1
Joined: Tue Jan 13, 2015 3:47 pm

Allow user to change max heap size

Hi,

I am using Advanced Installer to install an application to be data intensive. I would like to give users the option to increase their Java heap size. I would actually be okay with letting them edit the application ini, but Windows security prohibits this. Is this a problem other developers have faced and what is the best practice for resolving this?

thanks,
Chris
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Allow user to change max heap size

Hello Chris and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

If you need to let the user modify at install time the maximum heap size, then you can use an installer property which could be set at install time to the desired value. Here are the steps to proceed:
- go to "Install Parameters" page and add an installer property like this:
  • Name: MAX_MEM
    Value: <default value>
- go to "Java Products page -> Java Virtual Machine Tab" and set the maximum heap size to a desired value
- go to Table Editor page and in "IniFile" table locate the row "VirtualMachineParameters" and edit the "Value" column for it so that you have something like this
  • -Xmx[MAX_MEM]
- go to "Dialogs" page and add an edit box control (associated with "MAX_MEM" property) on a dialog where the user could set its maximum heap size
-build and run your project

Please keep in mind that in order to implement the above approach you need to use at least an "Enterprise" or above project type.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”