Search code examples
javansis

Passing values from Java to nsis script


I have a java code, where I give some variable dynamically. I need to pass that value to the nsis script. For example I will get a value of the variable age at runtime, and pass it to the var of the nsis script. Is it possible. Any suggestions...


Solution

  • The way I pass data to the NSIS script is with ant. When you build your installer you can place tokens in the NSI file and replace them. example using @product.name@ in the NSI file.:

      <replace file="${release.dir}/installer.nsi" token="@product.name@" value="${product.name}"/>