Repository navigation
Is there a way to install winget silently/unattended #3925
Unanswered
Joshua Houston (Houseton)
asked this question in
Q&A
Replies: 4 comments 8 replies
I've not seen Add-AppxPackage ever asking for source agreements 👀 Can you try the Sandbox Script at Microsoft Learn and see if that does anything differently for you? |
0 replies
|
If you’re using winget to install a package, you will likely need both |
3 replies
|
Once could check out https://learn.microsoft.com/en-us/windows/package-manager/winget/ $progressPreference = 'silentlyContinue'
Write-Information "Downloading WinGet and its dependencies..."
Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile Microsoft.VCLibs.x64.14.00.Desktop.appx
Invoke-WebRequest -Uri https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx -OutFile Microsoft.UI.Xaml.2.8.x64.appx
Add-AppxPackage Microsoft.VCLibs.x64.14.00.Desktop.appx
Add-AppxPackage Microsoft.UI.Xaml.2.8.x64.appx
Add-AppxPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundleTested it on Windows Sandbox with an "Administrator: PowerShell" |
1 reply
|
It seems that following does the trick Install-Module -Name WingetTools -Repository PSGallery -Force
Install-WinGet
winget install -e --id Mozilla.Firefox --accept-source-agreements |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm looking for a way to install winget application into a newly imaged Windows 10 machine without updates. I've used this code from winget.pro
But it still asks to accept the source agreement for the msstore. I'm trying to incorporate it into a script that runs after imaging and would like it to not need any input. I tried --accept-source-agreements but that is only used in winget itself and not Add-AppxPackage
All reactions