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

Install WinGet from terminal / PowerShell #2222

Closed
TheKnarf opened this issue Jun 6, 2022 · 4 comments
Closed

Install WinGet from terminal / PowerShell #2222

TheKnarf opened this issue Jun 6, 2022 · 4 comments
Assignees
Labels
Issue-Docs It's a documentation issue that really should be on MicrosoftDocs
Milestone

Comments

@TheKnarf
Copy link

TheKnarf commented Jun 6, 2022

Brief description of your issue

As an windows administrator I want to be able to provision windows machines using WinRM, as a part of provisioning machines I'd like to install WinGet and then use it to install all other programs needed.

There doesn't seem to be any instructions for how to install WinGet with just a remote terminal (using WinRM or alternatively OpenSSH). Nor any instructions for setting up WinGet using PowerShell.

With Chocolatey I just need to run:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

If I can't similarly automate the setup of WinGet and then use it then theres no way to replace Chocolatey with WinGet in my provisioning scripts. Which kind of make WinGet useless for most people? Is this missing functionality or just missing documentation?

@TheKnarf TheKnarf added the Issue-Docs It's a documentation issue that really should be on MicrosoftDocs label Jun 6, 2022
@ghost ghost added the Needs-Triage Issue need to be triaged label Jun 6, 2022
@denelon denelon removed the Needs-Triage Issue need to be triaged label Jun 6, 2022
@denelon
Copy link
Contributor

denelon commented Jun 6, 2022

The Windows Package Manager is shipped with the "App Installer".
If the Windows version already has the "App Installer", automatic updates will pull the latest stable version (containing Windows Package Manager).
It may be installed via the Microsoft Store, or the GitHub releases in this repository. I've seen several examples of using PowerShell do install the latter. We will likely include that functionality when we release the stable PowerShell module.
The "App Installer" is an MSIX package, so remote execution via system context isn't supported. We are building an in-process COM interface via a NuGet package to enable remote execution via system context.

@jedieaston
Copy link
Contributor

Related: #1474 and #1929

@A9G-Data-Droid
Copy link

The troubleshooting guide does show a command that should install WinGet from PowerShell locally. Instead it throws a COM Exception.

PS C:\temp\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe> Add-AppxProvisionedPackage -online -PackagePath '.\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle' -LicensePath '.\b0a0692da1034339b76dce1c298a1e42_License1.xml' -DependencyPackagePath '.\Microsoft.VCLibs.x64.14.00.Desktop.appx'
Add-AppxProvisionedPackage : Unspecified error
At line:1 char:1
+ Add-AppxProvisionedPackage -online -PackagePath '.\Microsoft.DesktopA ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-AppxProvisionedPackage], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.AddAppxProvisionedPackageCommand

@ranm-msft ranm-msft assigned denelon and unassigned msftrubengu Aug 9, 2022
@denelon denelon added this to WinGet Feb 14, 2023
@denelon denelon added this to the v1.5-Client milestone Feb 14, 2023
@denelon denelon modified the milestones: v1.5-Client, v.Next-Client Apr 18, 2023
@denelon denelon removed this from WinGet Jun 13, 2023
@denelon
Copy link
Contributor

denelon commented Jun 28, 2023

The Repair-WinGetPackageManager cmdlet in the Microsoft.WinGet.Client PowerShell Module does much of the work to handle dependencies, but Microsoft.UI.Xaml is still not handled in the most optimal way. We're looking at some options here to see if we can improve the situation without needing to download and decompress the dependency.

We've also been looking to update the dependency to Microsoft.UI.Xaml 2.8 from 2.7 in WinGet:

@denelon denelon modified the milestones: v.Next-Client, 1.8 Client Mar 6, 2024
@denelon denelon closed this as completed Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Docs It's a documentation issue that really should be on MicrosoftDocs
Projects
None yet
Development

No branches or pull requests

5 participants