Skip to content
  • Mattias Helsing's avatar
    CPack: Fix NSIS handling of privileged users (#12923) · c4a0bcea
    Mattias Helsing authored and Brad King's avatar Brad King committed
    When using the NSIS generator from CPack the file NSIS.template.in is
    used to generate a project.nsi file for NSIS to process.  The file
    consists code in the NSIS scripting language.  Among other functions
    there is an onInit function the initializes the installer.  The function
    (tries to) recognise admin and power users but fails since NSIS
    scripting language relative includes the jump from the current command
    so +3 means "run the third command after this one", so a failed check
    for admin completely skips the check for a power user and goes directly
    to "done:".
    
    User permission lookup was added in initial NSIS support by commit
    a11b9a4c (Merge from CPack branch, 2006-01-01).  Later commit b1b052fd
    (Several changes to for NSIS, 2006-03-01) added a line inside a block
    that should be skipped by a jump without updating the jump length.
    Update the jump length to correct the behavior.
    c4a0bcea