Search code examples
nsis

NSIS, progress bar not showing 100% on completion


I use NSIS to create installer . In my script !define MUI_FINISHPAGE_NOAUTOCLOSE so that user can see the installation file logs. But here my issue is even the progress text shows completed . progress bar underneath doesn't reflect 100%. Please find this screenshot

issue happens only in windows 7 , in Windows Xp its fine.

AFAIK pidgin uses NSIS installer script and for that I could able to see its Progressbar showing 100 % when gets completed.


Solution

  • Are you sure the progress bar goes to 100% on XP? Depending on the visual style, it might look like it is at 100% (You could try smooth progress bar (InstProgressFlags smooth) with "XPStyle off")

    The usual cause of this is a return in a section:

    Section
    ;some code here
    ${If} $x = $y
      return
    ${EndIf}
    ;some code here
    SectionEnd
    

    To work around a return problem you either change the code to use if/else blocks or put all of the logic in a function and call the function from the section.