nsis.uninstall.nsh 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. Section "Uninstall"
  2. # uninstall for all users
  3. setShellVarContext all
  4. # Delete (optionally) installed files
  5. {{range $}}Delete $INSTDIR\{{.}}
  6. {{end}}
  7. Delete $INSTDIR\uninstall.exe
  8. # Delete install directory
  9. rmDir $INSTDIR
  10. # Delete start menu launcher
  11. Delete "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk"
  12. Delete "$SMPROGRAMS\${APPNAME}\Attach.lnk"
  13. Delete "$SMPROGRAMS\${APPNAME}\Uninstall.lnk"
  14. rmDir "$SMPROGRAMS\${APPNAME}"
  15. # Firewall - remove rules if exists
  16. SimpleFC::AdvRemoveRule "Geth incoming peers (TCP:30303)"
  17. SimpleFC::AdvRemoveRule "Geth outgoing peers (TCP:30303)"
  18. SimpleFC::AdvRemoveRule "Geth UDP discovery (UDP:30303)"
  19. # Remove IPC endpoint (https://github.com/ethereum/EIPs/issues/147)
  20. ${un.EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\geth.ipc"
  21. # Remove install directory from PATH
  22. Push "$INSTDIR"
  23. Call un.RemoveFromPath
  24. # Cleanup registry (deletes all sub keys)
  25. DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}"
  26. SectionEnd