microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.28k stars 1.45k forks source link

Winget '--scope machine' Installation: Start Menu Entries Missing for Other Users #3323

Open Lonniebiz opened 1 year ago

Lonniebiz commented 1 year ago

Brief description of your issue

I'm accustom to using Ninite, but am trying to use winget to perform the same tasks. The problem with winget, versus ninite, is that ninite does a better job of making applications available to all users (especially non-tech users). While the --scope machine argument often installs in a manner where all users "could" use the installed program, the program's launcher doesn't make it into each user's start menu, like it definitely does with ninite.

Steps to reproduce

Take a snapshot of a freshly installed Windows 10 virtual machine, so that you can undo all testing after we're done.

Log into a workstation as administrator, install several programs using the --scope machine argument:

winget install 7zip --scope machine --source winget
winget install dia --scope machine
winget install flameshot --scope=machine -e
winget install Foxit --scope machine
winget install gimp --scope machine --source winget
winget install inkscape --scope machine --source winget
winget install LibreOffice --scope machine
winget install Notepad++ --scope machine
winget install Pidgin --scope machine
winget install Thunderbird --scope machine
winget install vlc --scope machine --source winget
winget install windirstat --scope machine

Now log into the workstation as a different user. Many of those programs will not be in the start menu's application list.

Expected behavior

Now, apply your snapshot to the virtual machine, so that all is like it was before we did the winget installations.

The expected behavior can be seen by placing a check box beside those same applications on this page: https://ninite.com/

Then, in step 2, (under "2. Download and run your custom installer/updater'), click the "Get Your Ninite" button. Run the file while being logged into a workstation as an administrator.

It will install all these same programs in a matter where all users (who log into this workstation) can access them from their start menus.

Actual behavior

The actual behavior is that some applications are installed in a manner where, when another user logs in, they have navigate the file system to launch the files instead of being able to discover them from the start menu like ninite achieves.

Environment

Windows Package Manager v1.4.11071
Windows: Windows.Desktop v10.0.19045.2965
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.11071.0
Trenly commented 1 year ago

When the machine scope is specified for an application, winget attempts to pass any flags needed to make the install machine-wide to the installer. It is up to the installer provided by the publisher of the software to do the "right thing" and add the start menu entries and shortcuts - that isn't something winget has control over. Additionally, some installers claim to install for all users but then end up only installing to a single user - despite writing their registry entries to say the install was "machine-wide"

There is a lot of non-standard behavior out there and, unfortunately, there may not be a lot winget can do to fix it. If machine scoped installs are known to be broken for a specific installer, we can restrict it to just user scope, but we don't have the ability to force the installers to add start menu icons or entries if they are "misbehaving"

stephengillie commented 1 year ago

Similar: