[PR #6176] [client] Clean up legacy 32-bit and HKCU registry entries on Windows install #29125

Closed
opened 2026-08-05 08:07:29 -04:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/6176

State: closed
Merged: Yes


Describe your changes

Legacy NSIS installers (pre-0.70.1, before SetRegView 64 was added in .onInit) wrote their HKLM registry entries from a 32-bit process, so the writes were WOW64-redirected to HKLM\Software\Wow6432Node\…. Even older builds wrote the autostart entry under HKCU. Neither the current NSIS nor the MSI removes those legacy values on upgrade, so a user who installed an older NSIS and later runs a newer installer (NSIS or MSI) ends up with duplicate Run\Netbird values across registry views and a stale row in Programs and Features.

  • NSIS install and uninstall: also clean HKCU\…\Run\Netbird and the 32-bit-view HKLM Run\Netbird, App Paths\Netbird{,-ui} and Uninstall\Netbird.
  • MSI: new per-machine always32 component removes the same Wow6432Node entries on install; new per-user component removes the HKCU Run\Netbird value. Both use marker KeyPaths under Software\NetBird GmbH\Installer.

https://github.com/netbirdio/netbird/issues/6049

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Internal installer behavior, no user-facing surface change.

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

Summary by CodeRabbit

  • Chores
    • Enhanced installer cleanup procedures to more thoroughly remove legacy registry entries and configuration settings left behind by previous versions. Both installation and uninstallation processes now provide improved cleanup across registry locations, ensuring better system cleanliness and preventing conflicts.

Review Change Stack

**Original Pull Request:** https://github.com/netbirdio/netbird/pull/6176 **State:** closed **Merged:** Yes --- ## Describe your changes Legacy NSIS installers (pre-0.70.1, before `SetRegView 64` was added in `.onInit`) wrote their HKLM registry entries from a 32-bit process, so the writes were WOW64-redirected to `HKLM\Software\Wow6432Node\…`. Even older builds wrote the autostart entry under HKCU. Neither the current NSIS nor the MSI removes those legacy values on upgrade, so a user who installed an older NSIS and later runs a newer installer (NSIS or MSI) ends up with duplicate `Run\Netbird` values across registry views and a stale row in Programs and Features. - NSIS install and uninstall: also clean `HKCU\…\Run\Netbird` and the 32-bit-view HKLM `Run\Netbird`, `App Paths\Netbird{,-ui}` and `Uninstall\Netbird`. - MSI: new per-machine `always32` component removes the same Wow6432Node entries on install; new per-user component removes the HKCU `Run\Netbird` value. Both use marker KeyPaths under `Software\NetBird GmbH\Installer`. ## Issue ticket number and link https://github.com/netbirdio/netbird/issues/6049 ## Stack <!-- branch-stack --> ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) Internal installer behavior, no user-facing surface change. ### Docs PR URL (required if "docs added" is checked) Paste the PR link from https://github.com/netbirdio/docs here: https://github.com/netbirdio/docs/pull/__ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Enhanced installer cleanup procedures to more thoroughly remove legacy registry entries and configuration settings left behind by previous versions. Both installation and uninstallation processes now provide improved cleanup across registry locations, ensuring better system cleanliness and preventing conflicts. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/netbirdio/netbird/pull/6176?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
saavagebueno added the pull-request label 2026-08-05 08:07:29 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#29125