!include x64.nsh !include LogicLib.nsh !ifdef NSIS_UNICODE !addplugindir "${basedir}/ant/windows/nsis/Plugins/Release_Unicode" !else !addplugindir "${basedir}/ant/windows/nsis/Plugins/Release_ANSI" !endif !addincludedir "${basedir}/ant/windows/nsis/Include" !include StdUtils.nsh !include FindJava.nsh !insertmacro GetParameters ; Run this exe as non-admin RequestExecutionLevel user ; Application information Name "${project.name}" Caption "${project.name}" Icon "${basedir}/assets/branding/windows-icon.ico" OutFile "${nsis.outfile}" SilentInstall silent AutoCloseWindow true ShowInstDetails nevershow ; Full path to jar !define JAR "$EXEDIR/${project.filename}.jar" Section ${If} ${RunningX64} ${DisableX64FSRedirection} ${EndIf} SetOutPath $EXEDIR ; Get params to pass to jar Var /GLOBAL params ${GetParameters} $params ; Sets the $java variable Call FindJava Exec '"$javaw" ${launch.opts} -jar "${JAR}" $params' ${If} ${RunningX64} ${EnableX64FSRedirection} ${EndIf} SectionEnd Function .onInit ${If} ${RunningX64} SetRegView 64 ${DisableX64FSRedirection} ${EndIf} FunctionEnd