Search code examples
electronnsiselectron-builder

Customize NSIS installer with Electron-builder


I want to customize NSIS script - e.g. remove Finish Page and run app immediately after install (assisted installer is used).

I use modifying scrpt: include: build/installer.nsh.

It opens myApp after install but Finish page is still there.

!include MUI2.nsh

!macro customInstall
  ExecWait '"$INSTDIR\myapp.exe" /sw'
!macroend

I mean I don't want to show the last page Completing myApp Setup as shown in gif.

install process

Any help appreciated.


Solution

  • Finally I did it in build/installer.nsh:

    !macro RunApp
      ${StdUtils.ExecShellAsUser} $0 "$launchLink" "open" ""
    !macroend
    
    !macro customInstall
        !insertmacro RunApp
        !insertmacro quitSuccess
    !macroend