Winget-cli: Please make installation for current user/all users, consistent for all packages

Created on 3 Jun 2020  路  11Comments  路  Source: microsoft/winget-cli

Description of the new feature/enhancement

I build my windows partition on a regular basis (to avoid the accumulation of junk) and I find that there is no easy way of rebuilding the application set. I have tried chocolatety for application installs as I thought that might give me a more linux like package handling capability, but I was wrong. To be fair to them, its not entirely their fault, but they do delegate the installation to the package so I suppose they are responsible to some degree. Which is why I turn to winget, in the hope that it would be able to fix this issue.

For winget, the problem as I see it is what does this mean?:

winget install \

Is this installed for all users or just the current user? If there was an overriding parameter (I'm not suggesting there should be, that's up to you), like 'ALLUSERS=1', then what is the default and is this standardised for all packages.

What my request would be, is firstly enforce standardisation for all packages. Secondly I would say, an application should be installed for all users by default, like it was in the old days with 'program files', how on earth did we get to a situation where this is no longer the case and worse still, this not being consistent.

One package as an example is Discord. I installed (via chocolatety, but I am requesting a better install experience under winget) that the other day on 1 account, but it was only for that account. I spent a few frustrating minutes in a different windows account wondering where on earth the app was and why I couldn't launch it, as it was not on the start menu and didn't pop up under the search application launcher.

This request is in slight contradiction with #281, but there is a way for both to be accommodated.

Proposed technical implementation details (optional)

If you want to make install to current user only, then let's have a system setting where we can specify this. I don't want the requirements of most users to trump the way that I want to use my own system, so please give us a choice.

Issue-Feature

Most helpful comment

Well I think you should take a stand, and fix the mess that we now have to put up with. Be authoritarian and get everyone to do the same thing. I dont care what the end decision is, as long as everything is consistent. I long for the days when we could just install an app and every account on the machine gets access to it. That the way it works on a mac and it works well, in fact I didnt even think this was an issue. I've only noticed it recently since I have started making the comeback to windows, but issues like this make me wonder if I should bother.

All 11 comments

To manage an installer that is inconsistent with expectations (like Discord), you have to go back and change the installer. That's unfortunately going to be the ONLY option with WinGet as it manages to the installers and depends on how good they are.

Well the whole point of my request is to put in a mechanism that ensures ALL package developers behave in the same way, and they should be removed if they don't conform. We need consistency here otherwise we end up with a mess, much like most package managers on windows 10 are today. I was hoping that because winget is in is relative early stages, this would be an issue that could and should be addressed. And for this reason, I would argue that no, it does not depend on how good 3rd party package handlers are. Force them to conform or reject them. This is the whole point.

ALL package developers behave in the same way

You say package developers - but there isn't a "package" here. It's only a manifest to an installer. So I think you mean the discord installer developers. It's been 20-30 years of a free for all on installer formats and that just doesn't get corrected overnight. I mean they have had a standard of MSI for years (and now MSIX), but folks can choose what they want and what works best and that's what you'll see a lot of. It's going to take years to correct that, although I could be wrong.

Well I think you should take a stand, and fix the mess that we now have to put up with. Be authoritarian and get everyone to do the same thing. I dont care what the end decision is, as long as everything is consistent. I long for the days when we could just install an app and every account on the machine gets access to it. That the way it works on a mac and it works well, in fact I didnt even think this was an issue. I've only noticed it recently since I have started making the comeback to windows, but issues like this make me wonder if I should bother.

The right thing to do is likely force everyone to MSIX and only work with MSIX. I don't think WinGet will go this route, even though I read that was one of the original thoughts.

This is also related to #149

@ferventcoder do you have a source for an MSIX only path?

Unfortunately, I doubt there is an MSIX available. I was speaking in generalities

Currently, winget defaults to (and seems to encourage), the use of per-user installers, and provides no method of selecting at installation time a per-machine installation for software that originally provides that choice. I propose implementing a switch/commandline parameter which would enable the end user to choose whether the installation performed would be per-user or per-machine. Some software offers this choice within their own installer (example: WinSCP), so a commandline parameter for the installer would be appropriate for such cases, and other software has completely separate per-mahine installers available; those would have to point to two different download URLs in the manifest, and select one depending on the choice (example: MS VS Code).

Also, the following logic would possibly be useful:

if running in an elevated command prompt: default to per-machine
if running in user context: default to per-user

There is a software called Cameyo that monitors installation. It keeps track of everything that happens during the install, every file and registry entry that is changed. Then it creates a portable package that includes all of those things in a sandbox. It's not always perfect but I think that Microsoft has a better perspective on this to be able to reliably capture all changes. A similar concept could be used to support any installer. It could detect unconventional installs and redirect them to a different location. It could track all changes so that it could automatically remove all traces in the event that the supplied uninstaller doesn't clean up after itself. If this information was stored in an easily readable format it would make great benefits to security and cleanliness of Windows, in general. This could solve the age old problems that come from installers that pepper the systems with changes that will never be undone.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nth10sd picture nth10sd  路  4Comments

TravisSpomer picture TravisSpomer  路  3Comments

sayedarifuddin picture sayedarifuddin  路  3Comments

TomBrien picture TomBrien  路  4Comments

auchenberg picture auchenberg  路  3Comments