Issue Configuring Winget Packages to install software
Describe the bug
I'm trying to install Visual C++ Redists through the software install and there's an issue reading a certain file or folder when winget is being configured
To Reproduce
Steps to reproduce the behavior:
To preface this, my OS is Windows 10 Pro Build 19041.1288, and i've more than likely turned off many things with Shut Up 10 that i'm not sure may be affecting this.
I don't know how this can be reproduced, as it's probably due to some configuration I made to my OS. But i have no idea which configuration.
- Open the WinUtil
- Go to the Install section, select Visual C++ 2015-2022 64-bit, and click "Install/Upgrade Selected"
- Monitor powershell and some output comes up saying that a file cannot be accessed by the system during Winget package configuration
Expected behavior
No errors in the shell when trying to install or configure winget packages
Screenshots
Additional context
Is there any verbose mode for the shell or in the utility I can set so I can see what file is trying to be accessed or what part of what script is running?
I also have the same issue Latest W11 24h2 IoT LTSC
@technub1, I had the say issue. Go to Config tab and click on "WinGet Reinstall", this will fix WinGet, then you can use the Install tab to install whatever program you where trying to install.
@eXsoR65 I actually noticed that shortly before making this issue and tried it, but even trying the reinstall was giving me certain errors from what i remember.
I just tried the reinstall again and there were errors when installing one package due to XboxGaming Overlay still running, and another error with a different package because there was a higher version of the package already installed.
It still said the install was successful. But when i tried to install the Redists again after that, it's just the same error. I don't know if i need to try to reboot and see if that helps or not, but i don't think it will.
Here's the gist for the powershell output to reinstall winget: https://gist.github.com/technub1/dd2c856ebc28e705dbc7d0c9bf1a5c75
You want to have a look at this log, as it seems to be using Chocolaty to install those packages.
Log location: C:\ProgramData\chocolatey\logs\chocolatey.log
@eXsoR65 I actually noticed that shortly before making this issue and tried it, but even trying the reinstall was giving me certain errors from what i remember.
I just tried the reinstall again and there were errors when installing one package due to XboxGaming Overlay still running, and another error with a different package because there was a higher version of the package already installed.
It still said the install was successful. But when i tried to install the Redists again after that, it's just the same error. I don't know if i need to try to reboot and see if that helps or not, but i don't think it will.
Here's the gist for the powershell output to reinstall winget: https://gist.github.com/technub1/dd2c856ebc28e705dbc7d0c9bf1a5c75
I had chocolatey ticked and forgot about it, but it looks like the same errors even with chocolatey turned off. XboxGaming Overlay running preventing a package from installing and another package that had a higher version already installed.
Here's a gist of that chocolatey log and it should show the same things: https://gist.github.com/technub1/8d7ae6a5a44583f8ce15bd39a6b487ec
winget reinstall doesnt fix it, I spent hours trying and manually forcing dependencies that it needed with no luck. I gave up. I was unable to get winget to install without errors Microsoft.UI.Xaml 2.7 microsoft-vclibs-140-00.14.0.33321 just stuck in a loop with dependencies whinging about each other:
PS C:\WINDOWS\system32> choco install microsoft-ui-xaml-2-7 Chocolatey v2.3.0 3 validations performed. 2 success(es), 1 warning(s), and 0 error(s).
Validation Warnings:
- A pending system reboot request has been detected, however, this is being ignored due to the current Chocolatey configuration. If you want to halt when this occurs, then either set the global feature using: choco feature enable --name="exitOnRebootDetected" or pass the option --exit-when-reboot-detected.
Installing the following packages: microsoft-ui-xaml-2-7 By installing, you accept licenses for the packages. [NuGet] One or more unresolved package dependency constraints detected in the Chocolatey lib folder. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'winget-cli 1.9.25180 constraint: microsoft-ui-xaml-2-7 (>= 2.7.0)', 'winget-cli 1.9.25180 constraint: microsoft-vclibs-140-00 (>= 14.0.30704)' Unable to resolve dependency 'microsoft-vclibs-140-00'. Source(s) used: 'https://community.chocolatey.org/api/v2/'.
Chocolatey installed 0/1 packages. 1 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- microsoft-ui-xaml-2-7 - Unable to resolve dependency 'microsoft-vclibs-140-00'. Source(s) used: 'https://community.chocolatey.org/api/v2/'.
Did you know the proceeds of Pro (and some proceeds from other licensed editions) go into bettering the community infrastructure? Your support ensures an active community, keeps Chocolatey tip-top, plus it nets you some awesome features! https://chocolatey.org/compare PS C:\WINDOWS\system32> choco install microsoft-vclibs-140-00 Chocolatey v2.3.0 3 validations performed. 2 success(es), 1 warning(s), and 0 error(s).
Validation Warnings:
- A pending system reboot request has been detected, however, this is being ignored due to the current Chocolatey configuration. If you want to halt when this occurs, then either set the global feature using: choco feature enable --name="exitOnRebootDetected" or pass the option --exit-when-reboot-detected.
Installing the following packages: microsoft-vclibs-140-00 By installing, you accept licenses for the packages. [NuGet] One or more unresolved package dependency constraints detected in the Chocolatey lib folder. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'winget-cli 1.9.25180 constraint: microsoft-ui-xaml-2-7 (>= 2.7.0)', 'winget-cli 1.9.25180 constraint: microsoft-vclibs-140-00 (>= 14.0.30704)' Unable to resolve dependency 'microsoft-ui-xaml-2-7'. Source(s) used: 'https://community.chocolatey.org/api/v2/'.
Chocolatey installed 0/1 packages. 1 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- microsoft-vclibs-140-00 - Unable to resolve dependency 'microsoft-ui-xaml-2-7'. Source(s) used: 'https://community.chocolatey.org/api/v2/'.
I have the same issue cannot be fixed with WinGet Reinstall...
event if i try in PS Admin, just typing c:\winget
Program 'winget.exe' failed to run: The file cannot be accessed by the systemAt line:1 char:1
- winget
-
At line:1 char:1
- winget
-
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException + FullyQualifiedErrorId : NativeCommandFailed
Tryed many website to fix and nothing work in my cases
To install Winget on W11 LTSC & W10 LTSC:
It has two dependencies which has to be installed first:
Microsoft.UI.Xaml (nuget):
- DOWNLOAD:
Invoke-WebRequest "https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml/2.8.6" -OutFile "c:\temp\microsoft.ui.xaml.2.8.6.nupkg.zip"
- EXTRACT PACKAGE:
Expand-Archive -Path "c:\temp\microsoft.ui.xaml.2.8.6.nupkg.zip" -DestinationPath "c:\temp\out"
- INSTALL:
Add-AppxPackage -Path "C:\TEMP\out\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.8.appx"
MS Visual C++ UWP Desktop Runtime Package (product-page)
In my case it was actually installed on my W11 box, but I had to install it on my W10 LTSC boxes.
- DOWNLOAD:
Invoke-WebRequest "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx" -OutFile "c:\temp\VCLibs.appx"
- INSTALL APPX PACKAGE
Add-AppxPackage -Path "c:\temp\VCLibs.appx"
WinGet
- Download msixbundble package
Invoke-WebRequest "https://github.com/microsoft/winget-cli/releases/download/v1.9.25180/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -OutFile "c:\temp\winget.msixbundle"
- Download license-file
Invoke-WebRequest "https://github.com/microsoft/winget-cli/releases/download/v1.9.25180/0a769c4da0ae4747ba4ab2f173709ced_License1.xml" -OutFile "c:\temp\winget_license.xml"
- Install msixbundle package with license-file
Add-AppxProvisionedPackage -Online -PackagePath "c:\temp\winget_.msixbundle" -LicensePath "c:\temp\winget_license.xml" -Verbose
You can get the newest download URLs from here: https://api.github.com/repos/microsoft/winget-cli/releases/latest
The issue seems to be with chocolaty it self trying to install Winget. In my case, it somehow managed to install Winget.
A possible workaround is what what stated in the above comment: https://github.com/ChrisTitusTech/winutil/issues/3003#issuecomment-2457312237
winget reinstall doesnt fix it, I spent hours trying and manually forcing dependencies that it needed with no luck.
I gave up. I was unable to get winget to install without errors
Microsoft.UI.Xaml 2.7
microsoft-vclibs-140-00.14.0.33321
just stuck in a loop with dependencies whinging about each other:
PS C:\WINDOWS\system32> choco install microsoft-ui-xaml-2-7
Chocolatey v2.3.0
3 validations performed. 2 success(es), 1 warning(s), and 0 error(s).
Validation Warnings:
A pending system reboot request has been detected, however, this is
being ignored due to the current Chocolatey configuration. If you
want to halt when this occurs, then either set the global feature
using:
choco feature enable --name="exitOnRebootDetected"
or pass the option --exit-when-reboot-detected.
Installing the following packages:
microsoft-ui-xaml-2-7
By installing, you accept licenses for the packages.
[NuGet] One or more unresolved package dependency constraints detected in the Chocolatey lib folder. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'winget-cli 1.9.25180 constraint: microsoft-ui-xaml-2-7 (>= 2.7.0)', 'winget-cli 1.9.25180 constraint: microsoft-vclibs-140-00 (>= 14.0.30704)'
Unable to resolve dependency 'microsoft-vclibs-140-00'. Source(s) used: 'https://community.chocolatey.org/api/v2/'.
Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- microsoft-ui-xaml-2-7 - Unable to resolve dependency 'microsoft-vclibs-140-00'. Source(s) used: 'https://community.chocolatey.org/api/v2/'.
Did you know the proceeds of Pro (and some proceeds from other
licensed editions) go into bettering the community infrastructure?
Your support ensures an active community, keeps Chocolatey tip-top,
plus it nets you some awesome features!
https://chocolatey.org/compare
PS C:\WINDOWS\system32> choco install microsoft-vclibs-140-00
Chocolatey v2.3.0
3 validations performed. 2 success(es), 1 warning(s), and 0 error(s).
Validation Warnings:
A pending system reboot request has been detected, however, this is
being ignored due to the current Chocolatey configuration. If you
want to halt when this occurs, then either set the global feature
using:
choco feature enable --name="exitOnRebootDetected"
or pass the option --exit-when-reboot-detected.
Installing the following packages:
microsoft-vclibs-140-00
By installing, you accept licenses for the packages.
[NuGet] One or more unresolved package dependency constraints detected in the Chocolatey lib folder. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'winget-cli 1.9.25180 constraint: microsoft-ui-xaml-2-7 (>= 2.7.0)', 'winget-cli 1.9.25180 constraint: microsoft-vclibs-140-00 (>= 14.0.30704)'
Unable to resolve dependency 'microsoft-ui-xaml-2-7'. Source(s) used: 'https://community.chocolatey.org/api/v2/'.
Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- microsoft-vclibs-140-00 - Unable to resolve dependency 'microsoft-ui-xaml-2-7'. Source(s) used: 'https://community.chocolatey.org/api/v2/'.
You can install xbox https://www.xbox.com/en-US/apps/xbox-app-on-pc This will install microsoft store After that update appinstaller from microsoft store library
What worked for me was running: wsreset -i
from a cmd prompt (Powershell Admin). The command prompt returned immediately and it looked like nothing happened, but in the background it shortly installed the MS Store and the app showed in the Start Menu. After that WinUtil could install apps.
This issue was marked as stale due to inactivity.