Skip to content

Commit

Permalink
fix(nsis): correctly remove shortcut and only remove directory if its…
Browse files Browse the repository at this point in the history
… empty

Close #2381
  • Loading branch information
timfish authored and develar committed Feb 22, 2018
1 parent 99c1025 commit 333a45d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/electron-builder-lib/templates/nsis/uninstaller.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ Section "un.install"
!ifndef DO_NOT_CREATE_START_MENU_SHORTCUT
WinShell::UninstShortcut "$oldStartMenuLink"

Delete "$oldStartMenuLink"
ReadRegStr $R1 SHELL_CONTEXT "${INSTALL_REGISTRY_KEY}" MenuDirectory
${if} $R1 == ""
Delete "$oldStartMenuLink"
${else}
RMDir /r "$SMPROGRAMS\$R1"
${ifNot} $R1 == ""
RMDir "$SMPROGRAMS\$R1"
${endIf}
!endif
${endIf}
Expand Down

0 comments on commit 333a45d

Please sign in to comment.