Skip to content

No applicable app licenses foundAt line:1 #700

Closed

Description

@jakko10

Brief description of the issue

PS C:\windows\system32> winget
Program 'winget.exe' failed to run: No applicable app licenses foundAt line:1 char:1
+ winget
+ ~~~~~~.
At line:1 char:1
+ winget
+ ~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedExceptio 
   n
    + FullyQualifiedErrorId : NativeCommandFailed

Steps to reproduce

Windows version; 1809 (OS Build 17763.1637)
Via powershell:

Add-AppxPackage Microsoft.VCLibs.140.00.UWPDesktop_14.0.29231.0_x64__8wekyb3d8bbwe
Add-AppxPackage Microsoft.VCLibs.140.00_14.0.29231.0_x64__8wekyb3d8bbwe
Add-AppxPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle

Expected behavior

When I type in winget, I should get the help.

Actual behavior

Program 'winget.exe' failed to run: No applicable app licenses foundAt line:1 char:1
+ winget
+ ~~~~~~.
At line:1 char:1
+ winget
+ ~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedExceptio 
   n
    + FullyQualifiedErrorId : NativeCommandFailed

Environment

[winget --info]
Windows Package Manager version
Windows: Windows.Desktop version
Package: Microsoft.DesktopAppInstaller version

Any other software?

Activity

  1. ghost added
    Needs-Triage
    on Jan 13, 2021
  2. added
    Issue-Bug
    and removed
    Needs-Triage
    on Jan 15, 2021
  3. denelon commented on Jan 15, 2021

    @denelon
    Collaborator

    jakko10 is this computer air-gapped or is it connected to the Internet?

  4. jakko10 commented on Jan 15, 2021

    @jakko10
    Author

    It's connected to the internet.

  5. matsmcp commented on Mar 16, 2021

    @matsmcp

    I have the same issue on an air-gapped 2022 preview server.
    Fully aware that 2022 preview is not production ready. Just wanted to inform that the Issue exists so it can be fixed before GA

  6. matsmcp commented on Mar 16, 2021

    @matsmcp

    Spun up a 2022 on my home workstation (that do have Internet access).
    On that one Windows terminal starts so on 2022 it seems to be an internet access issue.

  7. denelon commented on Mar 16, 2021

    @denelon
    Collaborator

    Thank you for letting us know. We're looking into the issue trying to determine the root cause.

  8. brwilkinson commented on Mar 18, 2021

    @brwilkinson

    Recent installs seem to work on Server 2022. Not sure if there was any change.

    Will update if future installs also work.

  9. matsmcp commented on Mar 18, 2021

    @matsmcp

    Mine has broken over night. It now says. The system cannot execute the specified program

  10. JohnT-MCE commented on Apr 15, 2021

    @JohnT-MCE

    Still experiencing error

  11. denelon commented on Apr 15, 2021

    @denelon
    Collaborator

    JohnT-MCE what version of Windows are you on?
    Is it a Windows Insider build?
    Is it Windows server?

  12. JohnT-MCE commented on Apr 15, 2021

    @JohnT-MCE

    JohnT-MCE what version of Windows are you on?
    Is it a Windows Insider build?
    Is it Windows server?

    Windows Server 2022 LTSC 21H2 (Build 20329)

  13. denelon commented on Apr 23, 2021

    @denelon
    Collaborator

    We need to provide an offline license for server 2022.

    Then the command to provision the license would look similar to:

    Add-AppxProvisionedPackage -Online -PackagePath c:\Appx\myPackage.appx -DependencyPackagePath c:\Appx\dependency1\dependencyPackage.appx -LicensePath c:\Appx\myLicense.xml

  14. 8 remaining items

  15. djpbessems commented on Jul 5, 2021

    @djpbessems

    Thanks for sharing jantari,
    Probably worth noting, that the cmdlet Add-AppxPackage does not have a -LicensePath parameter, so you have to use Add-AppxProvisionedPackage

  16. djpbessems commented on Jul 6, 2021

    @djpbessems

    For reference, this is the script I've used to install winget Windows Server 2019 myself
    (https://code.spamasaurus.com/djpbessems/Packer.Images/src/branch/Server2019/scripts/Install-WinGet.ps1):

    #Requires -Modules 'NtObjectManager'
    [CmdletBinding()]
    Param(
        # None
    )
    
    # Download dependencies
    $AppxDependencies = @(
        @{
            ShortName     = 'vclibs'
            QualifiedName = 'Microsoft.VCLibs.140.00_8wekyb3d8bbwe'
        },
        @{
            ShortName     = 'vclibsuwp'
            QualifiedName = 'Microsoft.VCLibs.140.00.UWPDesktop_8wekyb3d8bbwe'
        }
    )
    ForEach ($Dependency in $AppxDependencies) {
        $InvokeWebRequestSplat = @{
            Uri             = 'https://store.rg-adguard.net/api/GetFiles'
            Method          = 'POST'
            ContentType     = 'application/x-www-form-urlencoded'
            Body            = "type=PackageFamilyName&url=$($Dependency.QualifiedName)&ring=RP&lang=en-US"
            UseBasicParsing = $True
        }
        $InvokeWebRequestSplat = @{
            Uri     = ((Invoke-WebRequest @InvokeWebRequestSplat).Links | Where-Object {$_.OuterHTML -match '.appx' -and $_.outerHTML -match 'x64'}).href
            OutFile = "$env:temp/$($Dependency.ShortName).appx"
        }
        Invoke-WebRequest @InvokeWebRequestSplat
    }
    # Download latest release (along with license) from github
    $InvokeRestMethodSplat = @{
        Uri    = "https://api.github.com/repos/microsoft/winget-cli/releases/latest"
        Method = 'GET'
    }
    $LatestRelease = Invoke-RestMethod @InvokeRestMethodSplat
    $InvokeWebRequestSplat = @{
        Uri     = ($LatestRelease.assets | Where-Object {$_.name -like '*.msixbundle'}).browser_download_url
        OutFile = "$env:temp\winget.msixbundle"
    }
    Invoke-WebRequest @InvokeWebRequestSplat
    $InvokeWebRequestSplat = @{
        Uri     = ($LatestRelease.assets | Where-Object {$_.name -like '*license*.xml'}).browser_download_url
        OutFile = "$env:temp\wingetlicense.xml"
    }
    Invoke-WebRequest @InvokeWebRequestSplat
    
    # Install dependencies
    $AppxDependencies.ShortName | ForEach-Object {
        $AddAppxPackageSplat = @{
            Path = "$env:temp/$($_).appx"
        }
        Add-AppxPackage @AddAppxPackageSplat
    }
    # Install winget
    $AddAppxProvisionedPackageSplat = @{
        Online = $True
        PackagePath = "$env:temp\winget.msixbundle"
        LicensePath = "$env:temp\wingetlicense.xml"
    }
    Add-AppxProvisionedPackage @AddAppxProvisionedPackageSplat
    
    # Create reparse point
    $SetExecutionAliasSplat = @{
        Path        = "$([System.Environment]::SystemDirectory)\winget.exe"
        PackageName = "Microsoft.DesktopAppInstaller_8wekyb3d8bbwe"
        EntryPoint  = "Microsoft.DesktopAppInstaller_8wekyb3d8bbwe!winget"
        Target      = "$((Get-AppxPackage Microsoft.DesktopAppInstaller).InstallLocation)\AppInstallerCLI.exe"
        AppType     = 'Desktop'
        Version     = 3
    }
    Set-ExecutionAlias @SetExecutionAliasSplat
    & explorer.exe "shell:appsFolder\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe!winget"
    
  17. turbcool commented on Aug 20, 2021

    @turbcool

    In the latest release of winget (v1.0.11692 - link here) Microsoft quietly included a license XML file. I just tried it out and was now able to install and run winget on Server 2022 Preview with:

    Add-AppxProvisionedPackage -Online -PackagePath .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -LicensePath .\08d8788d59cf47ed9bf42c31e31f8efa_License1.xml -Verbose
    

    After that it just worked. Just a heads up in case anyone else here initially missed this.

    Thank you, this worked for me (Enterprise LTSC 2019)

  18. denelon commented on Aug 20, 2021

    @denelon
    Collaborator

    We are not targeting Windows server builds, but the license is included for offline installation. I missed closing this issue when it was added to the release artifacts.

  19. djpbessems commented on Aug 20, 2021

    @djpbessems

    We are not targeting Windows server builds, but the license is included for offline installation. I missed closing this issue when it was added to the release artifacts.

    To me that sounds like "we're trying to introduce a new tool, but we don't want it to become mainstream, so we'll only support half of our own portfolio of operating systems"

  20. denelon commented on Aug 20, 2021

    @denelon
    Collaborator

    Danny Bessems (@djpbessems) that was not the intent behind my comment.

    Currently, the Windows server SKUs don't ship with the Microsoft Store client enabled. This creates challenges for updating applications delivered by the Microsoft Store. As the Windows Package Manager ships as a part of the Desktop App Installer, and that is also not generally default on server SKUs, we don't yet have a solid delivery mechanism nor an update mechanism in place today.

    We have already started looking at the next evolution for the Store For Business. The future integration with Intune is part of the story as we work towards support across our entire product portfolio.

  21. djpbessems commented on Aug 21, 2021

    @djpbessems

    Demitrius Nelon (@denelon) Thanks for that clarification!
    Just so you know: at my current project, we'd kill for being able to use winget-cli over chocolatey during our Packer builds..., but we're staying away from it as long as we need to adopt different package managers between client and server OS builds

  22. doctordns commented on Aug 22, 2021

    @doctordns

    I continue to wonder why we have seen zero work on Cmdlets. This is disappointing - and for me at least a barrier to being able to recommend WinGet. It simply is not yet a complete Package Manager for Windows. Chocolately does a better job.

    Jeffrey Snover used to say "Microsoft is not capable of sustained failure." Not sure it's true, in this case. At least so far.

  23. Masamune3210 commented on Aug 22, 2021

    @Masamune3210

    ....I mean of course its not complete. Its not in the release build for a reason

  24. meiyujack commented on Jul 5, 2022

    @meiyujack

    Same on LTSC 2021, but thanks~

    In the latest release of winget (v1.0.11692 - link here) Microsoft quietly included a license XML file. I just tried it out and was now able to install and run winget on Server 2022 Preview with:

    Add-AppxProvisionedPackage -Online -PackagePath .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -LicensePath .\08d8788d59cf47ed9bf42c31e31f8efa_License1.xml -Verbose
    

    After that it just worked. Just a heads up in case anyone else here initially missed this.

  25. kaspersmjohansen commented on Jul 5, 2022

    @kaspersmjohansen

    Same on LTSC 2021, but thanks~

    In the latest release of winget (v1.0.11692 - link here) Microsoft quietly included a license XML file. I just tried it out and was now able to install and run winget on Server 2022 Preview with:

    Add-AppxProvisionedPackage -Online -PackagePath .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -LicensePath .\08d8788d59cf47ed9bf42c31e31f8efa_License1.xml -Verbose
    

    After that it just worked. Just a heads up in case anyone else here initially missed this.

    However still not supported in Windows Server 2022 or earlier

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions