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

Add winget-cli ("App Installer") #910

Closed
1 of 5 tasks
MCOfficer opened this issue May 20, 2020 · 18 comments
Closed
1 of 5 tasks

Add winget-cli ("App Installer") #910

MCOfficer opened this issue May 20, 2020 · 18 comments

Comments

@MCOfficer
Copy link

MCOfficer commented May 20, 2020

Tool information

  • Tool name: winget-cli
  • Tool license: MIT
  • Add or update? Add
  • Desired version: 1.0
  • Approximate size: probably ~5-10 MB
  • If this is an add request:

Area for Triage:
Scripting and command line (i hope? really unsure where to fit a package manager.)

Question, Bug, or Feature?:
Feature

Virtual environments affected

  • macOS 10.15
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS
  • Windows Server 2016 R2
  • Windows Server 2019

Can this tool be installed during the build?
I have not looked into it, since winget-cli is still in preview state. I do not expect you to add it anytime soon, consider this a request for the eventual v1.0. (Feel free to prove me wrong, though 😉 )

@maxim-lobanov
Copy link
Contributor

Thank you for feature request. In general, tool looks good to us but we would like to wait for stable release (v1.0 is going to come on May 2021 based on Roadmap or may be a bit earlier) and install it. Currently, packages base is pretty small and installation looks complicated (build from source code or Microsoft Store).
cc: @alepauly

@MCOfficer
Copy link
Author

Is there a reason this can't just stay open until winget comes out of preview? just curious

@maxim-lobanov
Copy link
Contributor

@MCOfficer , we would like to keep opened only those issues that we are planning to work on in next weeks / months to simplify maintenance of this repository. Official release date of this tool is defined as May 2021 based on Roadmap.
If you see that it is ready for pre-installation before, feel free to ping us and reopen this issue

@MCOfficer
Copy link
Author

I will try to keep track of it, if i miss it hopefully someone else picks it up. cheers!

@okofish
Copy link

okofish commented May 26, 2021

Version 1.0 of Windows Package Manager/winget was just released: https://github.com/microsoft/winget-cli/releases/tag/v1.0.11451

Is it appropriate to reopen this issue now?

@miketimofeev miketimofeev reopened this May 26, 2021
@miketimofeev
Copy link
Contributor

@okofish @MCOfficer reopened! Such a long wait 😅

@al-cheb
Copy link
Contributor

al-cheb commented May 26, 2021

We should wait until microsoft/winget-cli#754 will be fixed.

@al-cheb
Copy link
Contributor

al-cheb commented May 26, 2021

Workaround how to install winget in runtime on Windows Server 2019:

jobs:
  build:
    name: Build
    runs-on: windows-latest
    steps:
      - name: winget
        shell: powershell
        run: |
          # Install NtObjectManager module
          Install-Module NtObjectManager -Force
          # Install winget
          $vclibs = Invoke-WebRequest -Uri "https://store.rg-adguard.net/api/GetFiles" -Method "POST" -ContentType "application/x-www-form-urlencoded" -Body "type=PackageFamilyName&url=Microsoft.VCLibs.140.00_8wekyb3d8bbwe&ring=RP&lang=en-US" -UseBasicParsing | Foreach-Object Links | Where-Object outerHTML -match "Microsoft.VCLibs.140.00_.+_x64__8wekyb3d8bbwe.appx" | Foreach-Object href
          $vclibsuwp = Invoke-WebRequest -Uri "https://store.rg-adguard.net/api/GetFiles" -Method "POST" -ContentType "application/x-www-form-urlencoded" -Body "type=PackageFamilyName&url=Microsoft.VCLibs.140.00.UWPDesktop_8wekyb3d8bbwe&ring=RP&lang=en-US" -UseBasicParsing | Foreach-Object Links | Where-Object outerHTML -match "Microsoft.VCLibs.140.00.UWPDesktop_.+_x64__8wekyb3d8bbwe.appx" | Foreach-Object href
          Invoke-WebRequest $vclibsuwp -OutFile Microsoft.VCLibs.140.00.UWPDesktop_8wekyb3d8bbwe.appx
          Invoke-WebRequest $vclibs -OutFile Microsoft.VCLibs.140.00_8wekyb3d8bbwe.appx
          Add-AppxPackage -Path .\Microsoft.VCLibs.140.00.UWPDesktop_8wekyb3d8bbwe.appx
          Add-AppxPackage -Path .\Microsoft.VCLibs.140.00_8wekyb3d8bbwe.appx
          Invoke-WebRequest https://github.com/microsoft/winget-cli/releases/download/v1.0.11451/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle -OutFile Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle
          Add-AppxPackage -Path .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle
          # Create reparse point
          $installationPath = (Get-AppxPackage Microsoft.DesktopAppInstaller).InstallLocation
          Set-ExecutionAlias -Path "C:\Windows\System32\winget.exe" -PackageName "Microsoft.DesktopAppInstaller_8wekyb3d8bbwe" -EntryPoint "Microsoft.DesktopAppInstaller_8wekyb3d8bbwe!winget" -Target "$installationPath\AppInstallerCLI.exe" -AppType Desktop -Version 3
          explorer.exe "shell:appsFolder\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe!winget"
      - run: |
          winget --info

image

@miketimofeev
Copy link
Contributor

Since the installer is not yet available I'm going to close the issue. Please feel free to reopen or contact us when the installer is generally available.

@Croydon
Copy link

Croydon commented Oct 25, 2021

Installers do exist on the release page...?

https://github.com/microsoft/winget-cli/releases

@miketimofeev
Copy link
Contributor

@Croydon installation on windows server 2019 seems not supported yet microsoft/winget-cli#702

@nwmcsween
Copy link

here is a smaller script that works on windows 2019 and windows server 2022, mostly from @al-cheb above

$ErrorActionPreference = 'Stop'

iwr $(iwr 'https://store.rg-adguard.net/api/GetFiles' -Method 'POST' -ContentType 'application/x-www-form-urlencoded' -Body 'type=PackageFamilyName&url=Microsoft.VCLibs.140.00_8wekyb3d8bbwe&ring=RP&lang=en-US' -UseBasicParsing | Foreach-Object Links | Where-Object outerHTML -match 'Microsoft.VCLibs.140.00_.+_x64__8wekyb3d8bbwe.appx' | Foreach-Object href) -OutFile $env:TEMP\vclibs.appx
iwr $(iwr 'https://store.rg-adguard.net/api/GetFiles' -Method 'POST' -ContentType 'application/x-www-form-urlencoded' -Body 'type=PackageFamilyName&url=Microsoft.VCLibs.140.00.UWPDesktop_8wekyb3d8bbwe&ring=RP&lang=en-US' -UseBasicParsing | Foreach-Object Links | Where-Object outerHTML -match 'Microsoft.VCLibs.140.00.UWPDesktop_.+_x64__8wekyb3d8bbwe.appx' | Foreach-Object href) -OutFile $env:TEMP\vclibsuwp.appx
iwr 'https://github.com/microsoft/winget-cli/releases/download/v1.1.12653/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle' -OutFile $env:TEMP\winget.msixbundle
iwr 'https://github.com/microsoft/winget-cli/releases/download/v1.1.12653/9c0fe2ce7f8e410eb4a8f417de74517e_License1.xml' -Outfile $env:TEMP\winget.license

Add-AppxProvisionedPackage -Online -PackagePath $env:TEMP\winget.msixbundle -LicensePath $env:TEMP\winget.license -DependencyPackagePath @("$env:TEMP\vclibs.appx", "$env:TEMP\vclibsuwp.appx")

@Nelson-numerical-software

It is funny to have possibility to install a package with chocolatey and not with winget :( ...

@miketimofeev
Copy link
Contributor

@vedantmgoyal2009 sorry, I'm not the part of the team anymore.
@al-cheb @mikhailkoliada @ddobranic could you take a look?

@ArjixWasTaken
Copy link

how is this not done yet?

@Cyberboss
Copy link

Cyberboss commented Jun 26, 2023

I've created a simple action that does this on 2022 at least, 2019 doesn't work for now: https://github.com/marketplace/actions/install-winget

@kit-ty-kate
Copy link

It looks like Windows Server 2025 will have winget preinstalled according to https://techcommunity.microsoft.com/t5/windows-server-insiders/announcing-windows-server-preview-build-26063/m-p/4064942

@DRSchlaubi
Copy link

So ig the next question is, when will there be Windows Server 2025 runners?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests