build: Remove lingering Windows registry & shortcuts (#32132 follow-up) #33422

pull hodlinator wants to merge 1 commits into bitcoin:master from hodlinator:2025/09/32132_follow_up changing 1 files +9 −0
  1. hodlinator commented at 7:57 am on September 18, 2025: contributor

    Problem

    Prior to fb2b05b1259d3e69e6e675adfa30b429424c7625 / #32132 we installed using paths with an extra " (64-bit)"-suffix. Installing a version including that commit on top of a version that does not results in 2 entries in the “Installed apps” list. Both of them end up running the same C:\Program Files\Bitcoin\uninstall.exe. However, only one of the entries is removed by the uninstaller. The left over registry entry will now point to an executable that no longer exists and fail to work.

    Removing the left over “Installed apps” entry on master currently requires the user to manually remove the Windows Registry entries (or run the correct old/new installer to ensure the uninstaller exists again).

    Solution

    This PR automates removal of old entries (& shortcuts) when installing the new version.

    Disclaimer

    Not an NSIS expert - confirmed that added deletion commands work without causing any visible errors both when prior items exist and when they don’t.

  2. build(windows): Remove lingering registry entries and shortcuts upon install
    Prior to fb2b05b1259d3e69e6e675adfa30b429424c7625 / #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.
    1a4ad0ae50
  3. DrahtBot added the label Build system on Sep 18, 2025
  4. DrahtBot commented at 7:57 am on September 18, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33422.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK achow101

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  5. hodlinator renamed this:
    build: Clean lingering Windows registry & shortcuts (#32132 follow-up)
    build: Remove lingering Windows registry & shortcuts (#32132 follow-up)
    on Sep 18, 2025
  6. achow101 added this to the milestone 30.0 on Sep 18, 2025
  7. hodlinator commented at 8:07 pm on September 18, 2025: contributor

    Parallel uninstall entries:

    Error when trying to uninstall the second entry after the first one has already been uninstalled:

  8. in share/setup.nsi.in:124 in 1a4ad0ae50
    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)"
    


    hodlinator commented at 8:12 pm on September 18, 2025:
    Apart from the added (64-bit) suffix, these are copied from the uninstaller sections below, excluding items which would not originally have had the suffix.
  9. fanquake commented at 9:00 pm on September 18, 2025: member
  10. achow101 commented at 9:23 pm on September 18, 2025: member

    ACK 1a4ad0ae501d15f77b1601ace3e1a1c8bf440dd6

    Tested on Windows 11, and it appears to correctly remove the old (64-bit) uninstall entry.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-09-19 00:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me