Skip to content

Commit 1a4ad0a

Browse files
committed
build(windows): Remove lingering registry entries and shortcuts upon install
Prior to fb2b05b / #32132 we installed using these paths. The lingering registry entries for the uninstaller would show up as "Bitcoin Core (64-bit)" in the list of installed programs and fail to work.
1 parent 947bed2 commit 1a4ad0a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

share/setup.nsi.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,15 @@ Section -post SEC0001
113113
WriteRegStr HKCR "@CLIENT_TARNAME@" "" "URL:Bitcoin"
114114
WriteRegStr HKCR "@CLIENT_TARNAME@\DefaultIcon" "" $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
115115
WriteRegStr HKCR "@CLIENT_TARNAME@\shell\open\command" "" '"$INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@" "%1"'
116+
117+
DeleteRegValue HKCU "${REGKEY} (64-bit)\Components" Main
118+
DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name) (64-bit)"
119+
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name) (64-bit).lnk"
120+
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\$(^Name) (64-bit).lnk"
121+
DeleteRegValue HKCU "${REGKEY} (64-bit)" StartMenuGroup
122+
DeleteRegValue HKCU "${REGKEY} (64-bit)" Path
123+
DeleteRegKey /IfEmpty HKCU "${REGKEY} (64-bit)\Components"
124+
DeleteRegKey /IfEmpty HKCU "${REGKEY} (64-bit)"
116125
SectionEnd
117126

118127
# Macro for selecting uninstaller sections

0 commit comments

Comments
 (0)