microsoft / microsoft/winget-cli
Accept EULA remote doesn't work or isn't well documented
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
I rolled out Winget to our domain machines and i'm facing an issue where i cant install a package due to the fact the msstore agreement terms aren't accepted.
The exact error:
...> winget upgrade "Adobe Acrobat (64-bit)" --silent --accept-source-agreements --accept-source-agreements
The 'msstore' source requires that you view the following agreements before using.
Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US").
Failed when searching source: winget
An unexpected error occurred while executing the command:
0x8a15000f : Data required by the source is missing
Steps to reproduce
Let me walk you through the steps i've taken.
First step, install Winget on remote computers
Invoke-Command -ComputerName $Computername -ScriptBlock {
$Hostname = Hostname
#Install Winget and extra's
Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml/2.7.3 -OutFile C:\temp\microsoft.ui.xaml.2.7.3.zip
Expand-Archive -Path "C:\temp\microsoft.ui.xaml.2.7.3.zip" -DestinationPath "C:\temp\microsoft.ui.xaml.2.7.3"
Add-AppxPackage C:\temp\microsoft.ui.xaml.2.7.3\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.7.appx
Invoke-WebRequest -Uri https://github.com/microsoft/winget-cli/releases/download/v1.3.2691/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -OutFile C:\temp\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile C:\temp\Microsoft.VCLibs.x64.14.00.Desktop.appx
Add-AppxPackage C:\temp\Microsoft.VCLibs.x64.14.00.Desktop.appx
Add-AppxPackage C:\temp\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
#Clean-up
Remove-Item "C:\temp\microsoft.ui.xaml.2.7.3" -Recurse
Remove-Item "C:\temp\microsoft.ui.xaml.2.7.3.zip"
Remove-Item "C:\temp\Microsoft.VCLibs.x64.14.00.Desktop.appx"
Remove-Item "C:\temp\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
#Show version if succes
Write-Host "$Hostname - $(winget -v)"
}
This installs version v1.3.2691 on all computers.
Expected behavior
I excepted so see that is would upgrade adobe reader.
Actual behavior
Next step was trying to upgrade something like Adobe Reader. I first searched using Winget search adobe for the right package name which led me to:
winget upgrade "Adobe Acrobat (64-bit)" --silent
But this resulted in the error:
...> winget upgrade "Adobe Acrobat (64-bit)" --silent
The `msstore` source requires that you view the following agreements before using.
Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US").
Do you agree to all the source agreements terms?
[Y] Yes [N] No: An unexpected error occurred while executing the command:
0x8a150042 : Error reading input in prompt
So after some googling i found out i can add the --accept-source-agreements and --accept-package-agreements parameters to accept it remotely. Like this topic describes: #1536 but as you can see above in the first code block this still results in that error.
Next step was asking ChatGPT since i didn't find any other hint on google. ChatGPT suggested running:
Start-Process -FilePath "winget" -ArgumentList "features", "-a" -WindowStyle Hidden -Wait
But this didn't change anything.
Back to google and i found out that there is also an ADMX file for GPO control. Imported that, enabled Winget AND set the trusted sources to msstore and winget but again without success.
Finally I tried reinstalling everything and also source reset but all with no luck.
Am i missing something here? Hopefully someone could pinpoint the problem.
Thanks!
Environment
Windows Package Manager v1.4.10173
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.19044.2728
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.10173.0
Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported PowerShell remoting commands, the winget upgrade invocation, and the documented errors 0x8a15000f and 0x8a150042. Reproduce the remote installation and upgrade flow using the stated Windows and WinGet versions, then trace whether source agreements and geographic-region data are handled correctly. Done means the remote command completes without an interactive prompt or missing-source-data error, or the required documentation clearly explains the limitation and workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, powershell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100