Skip to content

Commit 79752b9

Browse files
committed
build(windows): Remove lingering registry entries and shortcuts upon install
Prior releases installed using these paths. Especially annoying was that the lingering registry entry for the uninstaller would show up as "Bitcoin Core (64-bit)" besides the current "Bitcoin Core" entry in the list of installed programs, and whichever was uninstalled last would fail to work as they would default to the same install directory.
1 parent 947bed2 commit 79752b9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

share/setup.nsi.in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,19 @@ 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+
# Lingering since fb2b05b1259d3e69e6e675adfa30b429424c7625 which removed the suffix
118+
DeleteRegValue HKCU "${REGKEY} (64-bit)\Components" Main
119+
DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name) (64-bit)"
120+
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name) (64-bit).lnk"
121+
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\$(^Name) (64-bit).lnk"
122+
DeleteRegValue HKCU "${REGKEY} (64-bit)" StartMenuGroup
123+
DeleteRegValue HKCU "${REGKEY} (64-bit)" Path
124+
DeleteRegKey /IfEmpty HKCU "${REGKEY} (64-bit)\Components"
125+
DeleteRegKey /IfEmpty HKCU "${REGKEY} (64-bit)"
126+
127+
# Lingering since 77b2923f87131a407f7d4193c54db22375130403
128+
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Bitcoin Core (testnet, 64-bit).lnk"
116129
SectionEnd
117130

118131
# Macro for selecting uninstaller sections

0 commit comments

Comments
 (0)