Skip to content

Connect: switch Windows installer to dual mode#62910

Merged
gzdunek merged 17 commits intomasterfrom
gzdunek/connect-dual-mode-installer
Feb 5, 2026
Merged

Connect: switch Windows installer to dual mode#62910
gzdunek merged 17 commits intomasterfrom
gzdunek/connect-dual-mode-installer

Conversation

@gzdunek
Copy link
Copy Markdown
Contributor

@gzdunek gzdunek commented Jan 16, 2026

Closes #53171

The RFD 0242 is still in review, but I'm sharing how the dual mode installer will look like.

To support per-user mode, we switch the installer from the "one-click" setup to the installation wizard. If the user chooses the "Only for me" option, the VNet service will not be installed.

image

To improve user experience, the app checks if the VNet service is installed. If not, it shows a warning and disables the VNet auto-start.

image

You might be wondering what happens if the same app is installed in both modes. My observation is that the latest installation wins: it replaces the Start Menu and Desktop shortcuts, and only that instance appears in the Installed Apps list. The other instance can only be accessed by locating it manually on disk.

Having both per-machine and per-user instances installed can cause issues with the updater. Initially, I assumed that per-user updates would work with the existing NSIS updater without any changes. However, when the same app is installed for both scopes, NSIS's internal update logic detects the per-machine instance first, which triggers a request for elevated privileges. The workaround is to customize the updater to pass the /currentuser flag, forcing it to target the per-user installation.

The app distinguishes between these modes by checking if its install directory matches Connect's InstallLocation in HKLM.

changelog: Restored support for per-user installation of Teleport Connect on Windows, eliminating the need for elevated privileges. VNet is not available in this mode.

I will prepare and publish some dev builds to allow testing this change.
This PR will be backported once the Update Service is added to keep these changes together.

Comment thread proto/teleport/lib/teleterm/vnet/v1/vnet_service.proto Outdated
@ravicious ravicious self-requested a review January 19, 2026 15:43
Comment thread web/packages/teleterm/build_resources/installer.nsh Outdated
@ravicious ravicious self-requested a review January 20, 2026 16:17
Comment thread web/packages/teleterm/src/ui/Vnet/vnetContext.tsx Outdated
Comment thread web/packages/teleterm/build_resources/installer.nsh Outdated
Comment thread web/packages/teleterm/build_resources/installer.nsh Outdated
Comment thread web/packages/teleterm/build_resources/installer.nsh Outdated
Comment thread web/packages/teleterm/src/services/appUpdater/nsisDualModeUpdater.ts Outdated
@gzdunek gzdunek requested a review from ravicious January 23, 2026 12:54
Copy link
Copy Markdown
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some further suggestions but it looks good.

Comment thread web/packages/teleterm/build_resources/installer.nsh Outdated
Comment thread lib/teleterm/autoupdate/service.go Outdated
Comment thread proto/teleport/lib/teleterm/auto_update/v1/auto_update_service.proto Outdated
@gzdunek
Copy link
Copy Markdown
Contributor Author

gzdunek commented Jan 30, 2026

Friendly ping @nklaassen :)

@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from nklaassen February 3, 2026 22:05
@gzdunek gzdunek added this pull request to the merge queue Feb 5, 2026
Merged via the queue into master with commit 336379e Feb 5, 2026
44 checks passed
@gzdunek gzdunek deleted the gzdunek/connect-dual-mode-installer branch February 5, 2026 09:42
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@gzdunek See the table below for backport results.

Branch Result
branch/v17 Failed
branch/v18 Create PR

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this PR have closed #53171? It's still going to take some time until we release the dual mode installer, no? I mean at least I was under the impression that it needs to wait for the privileged update service.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it will be released along with the privileged update service. I will keep the issue open for now.

gzdunek added a commit that referenced this pull request Mar 27, 2026
* Switch installer to dual-mode

* Customize NSIS updater to disallow attempts to update per-machine installations if update is triggered from per-user instance

* Make `assertTshInProgramFiles` more strict

Reading Program Files path should be done using Windows API instead of env var that can be overridden.

* Add RPC to check if VNet service is installed

* Show warning and disable auto-start if there is no VNet service

* `GetWindowsSystemService` -> `CheckPreRunRequirements`

* `CheckPreRunRequirements` -> `CheckInstallTimeRequirements`

* Customize `forAll` option with VNet message

* Check for per-machine installation in system registry

* Fix vars with PreRun in the name

* Link to source file from the electron-builder repo, add commit hash

* Read per-machine location from Go instead of via PowerShell

* `IsPerMachineInstallResponse` -> `GetInstallationMetadataResponse`

* Define `GetInstallationMetadata` handler in separate file

* Fix tests failing on "updates not wrapped into act"

(cherry picked from commit 336379e)
gzdunek added a commit that referenced this pull request Mar 30, 2026
* Switch installer to dual-mode

* Customize NSIS updater to disallow attempts to update per-machine installations if update is triggered from per-user instance

* Make `assertTshInProgramFiles` more strict

Reading Program Files path should be done using Windows API instead of env var that can be overridden.

* Add RPC to check if VNet service is installed

* Show warning and disable auto-start if there is no VNet service

* `GetWindowsSystemService` -> `CheckPreRunRequirements`

* `CheckPreRunRequirements` -> `CheckInstallTimeRequirements`

* Customize `forAll` option with VNet message

* Check for per-machine installation in system registry

* Fix vars with PreRun in the name

* Link to source file from the electron-builder repo, add commit hash

* Read per-machine location from Go instead of via PowerShell

* `IsPerMachineInstallResponse` -> `GetInstallationMetadataResponse`

* Define `GetInstallationMetadata` handler in separate file

* Fix tests failing on "updates not wrapped into act"

(cherry picked from commit 336379e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Teleport Connect installer should have a per-user mode

3 participants