Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] MSI installer uses HKCU despite being per-machine installation #12396

Open
tomasz13nocon opened this issue Jan 14, 2025 · 1 comment
Open
Labels
platform: Windows status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@tomasz13nocon
Copy link

Describe the bug

The installer performs what appears to be a per-machine installation:

  • Installs to Program Files by default
  • Requires admin privileges
  • Creates shortcuts in Public Desktop and ProgramData Start Menu (accessible to all users)

However, InstallDir, Desktop Shortcut and other registry keys are created under HKCU

One issue caused by this is in the scenario:

  • User A installs the program, registry keys are created in User A's HKCU
  • If User B uninstalls the program, the files and public shortcuts are removed
  • But User A's HKCU registry entries remain since User B's uninstaller can't access them
  • This leaves orphaned registry entries for any user who installed but didn't uninstall the program themselves

Is this intended behavior or should the registry keys be in HKLM since this is a per-machine installation?

Reproduction

No response

Expected behavior

No response

Full tauri info output

> tauri info


[✔] Environment
    - OS: Windows 10.0.22631 x86_64 (X64)
    ✔ WebView2: 131.0.2903.112
    ✔ MSVC: Visual Studio Build Tools 2022
    ✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
    ✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 22.9.0
    - npm: 10.9.0

[-] Packages
    - tauri 🦀: 2.1.1
    - tauri-build 🦀: 2.0.3
    - wry 🦀: 0.47.2
    - tao 🦀: 0.30.8
    - @tauri-apps/api : 2.1.1 (outdated, latest: 2.2.0)
    - @tauri-apps/cli : 2.1.0 (outdated, latest: 2.2.4)

[-] Plugins
    - tauri-plugin-shell 🦀: 2.2.0
    - @tauri-apps/plugin-shell : 2.2.0
    - tauri-plugin-dialog 🦀: 2.2.0
    - @tauri-apps/plugin-dialog : 2.2.0
    - tauri-plugin-fs 🦀: 2.2.0
    - @tauri-apps/plugin-fs : not installed!

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../build
    - devUrl: http://localhost:1420/
    - framework: Svelte
    - bundler: Vite

Stack trace

No response

Additional context

No response

@tomasz13nocon tomasz13nocon added status: needs triage This issue needs to triage, applied to new issues type: bug labels Jan 14, 2025
@FabianLars
Copy link
Member

Is this intended behavior or should the registry keys be in HKLM since this is a per-machine installation?

It's not intended, our WiX file is honestly a bit messed up and this has been on my radar for ages but i never found the motivation to touch xml. If you're interested in contributing a fix then we'd much appreciate it. Otherwise i'd probably delay it until i find the motivation to add wix 5 support (fairly high on my todo since wix 3 goes out of support next month - though tbf it never really received many updates anyway).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Windows status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

2 participants