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.35k stars 1.45k forks source link

Improvements to make Repair a more complete bootstrapping solution #4947

Open JohnMcPMS opened 2 weeks ago

JohnMcPMS commented 2 weeks ago

Description of the new feature / enhancement

Suggestions from one of our very dedicated users:

  1. Register for the user (when appropriate) after Repair -AllUsers a. While the provisioning step does this eventually, it is not synchronous and can break scripts that want to immediately use winget
  2. Ensure that Repair also installs the winget-cli source package. a. This is actually a workaround for an OS issue that prevents winget.exe from installing it in certain scenarios b. An alternative solution would be to move away from installing it at all and have all code paths use the unpackaged path (this does have a performance cost though)
  3. Fix Win32Exception An error occurred trying to start process 'winget.exe' error the first time Repair -AllUsers is run a. Possibly only repros in the headless scenario
  4. Repair -Force should bypass checks and attempt to install everything

They also suggest effectively #4390 , but including all PowerShell modules.

Proposed technical implementation details

No response

florelis commented 1 week ago

It should also install the unpackaged vcredist for that weird admin DLL load path bug. We have several issues open for "does not run as system" where the solution is to manually install it (e.g. #4798); might as well automate that.