1
0
mirror of https://github.com/lensapp/lens.git synced 2024-09-20 13:57:23 +03:00
lens/build/installer.nsh
Lauri Nevala 09074e764c
Fix windows installer when app directory removed manually (#893)
* Fix windows installer when app directory removed manually

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
2020-09-16 21:44:08 +03:00

12 lines
605 B
Plaintext

!macro customInit
; Workaround for installer handing when the app directory is removed manually
${ifNot} ${FileExists} "$INSTDIR"
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\{${UNINSTALL_APP_KEY}}"
${EndIf}
; Workaround for the old-format uninstall registry key (some people report it causes hangups, too)
ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL_APP_KEY}" "QuietUninstallString"
StrCmp $0 "" proceed 0
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL_APP_KEY}"
proceed:
!macroend