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

[Package Issue]: Rustlang.Rust.MSVC does not install when scope is specified #153349

Open
2 tasks done
fgimian opened this issue May 13, 2024 · 3 comments
Open
2 tasks done
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.

Comments

@fgimian
Copy link
Contributor

fgimian commented May 13, 2024

Please confirm these before moving forward

  • I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
  • I have not been informed if the issue is resolved in a preview version of the winget client.

Category of the issue

Installation issue.

Brief description of your issue

Rust installs to C:\Program Files much like various other packages, but can only be installed with no --scope parameter specified.

Please note that this seems to affect other Rust packages such as Rustlang.Rustup too.

Steps to reproduce

  1. Open a terminal as Administrator
  2. Run winget install --scope machine Rustlang.Rust.MSVC
  3. Run winget install --scope user Rustlang.Rust.MSVC

Actual behavior

Administrator in ~
🕙 [ 09:10:36 PM ] ❯ winget install --scope machine Rustlang.Rust.MSVC
No applicable installer found; see logs for more details.

Administrator in ~
🕙 [ 09:16:36 PM ] ❯ winget install --scope user Rustlang.Rust.MSVC
No applicable installer found; see logs for more details.

The errer in the log appears to be:

2024-05-13 21:10:39.320 [CLI ] Terminating context: 0x8a150010 at C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\UpdateFlow.cpp:bc

Expected behavior

Installation should succeed, at least with --scope machine. Various other similar packages like 7zip.7zip work in this situation.

Environment

Windows Package Manager v1.7.11261
Windows: Windows.Desktop v10.0.22631.3447
Package: Microsoft.DesktopAppInstaller v1.22.11261.0

Screenshots and Logs

No response

@fgimian fgimian added the Issue-Bug It either shouldn't be doing this or needs an investigation. label May 13, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage This work item needs to be triaged by a member of the core team. label May 13, 2024
@fgimian fgimian changed the title [Package Issue]: Rustlang.Rust.MSVC does not install using machine scope [Package Issue]: Rustlang.Rust.MSVC does not install when scope is specified May 13, 2024
@Trenly
Copy link
Contributor

Trenly commented May 13, 2024

It seems there is no scope specified in the manifest because the installer is a Wix installer.

There is an issue with the Wix compiler where when applications are installed in User scope the installer will write entries to HKLM, which is the registry for Machine-scoped applications, when it should be writing to HKCU. Because of this bug in Wix, specifying Scope: user for any installer in the manifest would cause installation detection issues, and specifying Scope: machine wouldn't allow it to be installed in user scope.

I'm not sure this can be fixed until the Wix compiler is updated

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage This work item needs to be triaged by a member of the core team. label May 13, 2024
@stephengillie
Copy link
Collaborator

Should some kind of error or informational message be presented when a user attempts to install a Wix package with a scope specified? Since this bug is known, pass that info to the user in the client somehow?

@Trenly
Copy link
Contributor

Trenly commented May 13, 2024

Should some kind of error or informational message be presented when a user attempts to install a Wix package with a scope specified? Since this bug is known, pass that info to the user in the client somehow?

The thing is, it doesn't affect all Wix installers, just most of them. Some ISV's have implemented workarounds where they write their own ARP entries and suppress the ones that Wix adds.

I think that perhaps --scope could be added as an allowed value in the UnsupportedArguments list, that would be a fairly minor change in the schema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

3 participants