Repository navigation
Description
Brief description of your issue
I work at a large organization and we are trying to automate the process of updating apps using WinGet and Lansweeper.
I wrote a script that uses 'winget export' to save a JSON of the installed apps on the device, and compares that to an approved_apps.json file that has the version number we want the apps to update to. When I am logged in as an administrator, the script runs with no issues.
However, when I try to deploy the script through Lansweeper, it fails to export the JSON file. Additionally, I keep getting this error message: "Failed to open available source: winget". I have tried to deploy the script using "system account" and "scanning credentials" on Lansweeper and in both instances it fails. I have also tried to specify the proxy as well but it still fails.
I re-wrote the script without using winget export, but I run into the same issue because of this error "Failed to open available source: winget". When deployed through lansweeper, I keep getting the error message that "[AppID] Not installed."
WinGet-2025-07-03-09-54-33.024.log
Steps to reproduce
winget export -o "c:\WinGet Logs\packages.json" --include-versions --accept-source-agreements
Expected behavior
The expected behaviour is that winget successfully exports the packages.json file and does not run into the "Failed to open available source: winget" issue.
Actual behavior
packages.json is not being exported. Failed to open available source: winget
2025-07-03 09:54:33.026 [CORE] Command line Args: "C:\Users\adminNB\AppData\Local\Microsoft\WindowsApps\winget.exe" export -o C:\Test\packages.json --include-versions --accept-source-agreements --open-logs
2025-07-03 09:54:33.026 [CORE] Package: Microsoft.DesktopAppInstaller v1.25.390.0
2025-07-03 09:54:33.026 [CORE] IsCOMCall:0; Caller: winget-cli
2025-07-03 09:54:33.033 [CLI ] WinGet invoked with arguments: 'export' '-o' 'C:\Test\packages.json' '--include-versions' '--accept-source-agreements' '--open-logs'
2025-07-03 09:54:33.033 [CLI ] Found subcommand: export
2025-07-03 09:54:33.033 [CLI ] Leaf command to execute: root:export
2025-07-03 09:54:33.036 [CLI ] Executing command: export
2025-07-03 09:54:33.053 [REPO] Default source requested, multiple sources available, adding all to source references.
2025-07-03 09:54:33.053 [REPO] Adding to source references msstore
2025-07-03 09:54:33.053 [CORE] Default proxy is not set
2025-07-03 09:54:33.053 [REPO] REST HTTP Client helper does not use proxy
2025-07-03 09:54:33.053 [REPO] Adding to source references winget
2025-07-03 09:54:33.054 [CLI ] Created authentication arguments. Mode: silentPreferred, Account:
2025-07-03 09:54:33.058 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2025-07-03 09:54:33.059 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2025-07-03 09:54:33.203 [CORE] Downloading to path: C:\Users\adminNB\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2025-07-03 09:54:33.204 [CORE] Started applying motw to C:\Users\adminNB\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix with zone: 3
2025-07-03 09:54:33.206 [CORE] Finished applying motw
2025-07-03 09:54:33.206 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/source2.msix
2025-07-03 09:54:33.472 [CORE] Download hash: de86fb3dd8e4e9a5fac0e910ce56d154b7eb42e15118ba1594c5ce4c62db21e2
2025-07-03 09:54:33.472 [CORE] Download completed.
2025-07-03 09:54:33.534 [CORE] Started trust validation of msix at: C:\Users\adminNB\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2025-07-03 09:54:33.569 [CORE] Result for certificate chain validation of Microsoft origin: 0
2025-07-03 09:54:33.602 [CORE] Result for trust info validation of the msix: 0
2025-07-03 09:54:33.602 [CORE] Starting AddPackage operation #0: file:///C:/Users/adminNB/AppData/Local/Temp/WinGet/Microsoft.Winget.Source_8wekyb3d8bbwe.msix Options: { SkipReputationCheck = 1, ExpectedDigests = {} }
2025-07-03 09:54:33.603 [CORE] Begin waiting for operation #0
2025-07-03 09:54:33.604 [CORE] Begin blocking for operation #0
2025-07-03 09:54:33.669 [CORE] Successfully completed #0
2025-07-03 09:54:33.675 [REPO] Multiple sources available, creating aggregated source.
2025-07-03 09:54:33.675 [REPO] Adding to aggregated source: msstore
2025-07-03 09:54:33.675 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2025-07-03 09:54:33.757 [REPO] Response status: 200
2025-07-03 09:54:33.757 [REPO] Authentication node not found. Assuming authentication type none.
2025-07-03 09:54:33.758 [REPO] Adding to aggregated source: winget
2025-07-03 09:54:33.761 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2025-07-03 09:54:33.761 [REPO] Package not found Microsoft.Winget.Source_8wekyb3d8bbwe
2025-07-03 09:54:33.762 [FAIL] C:__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(446)\WindowsPackageManager.dll!00007FFCCACC1723: (caller: 00007FFCCACA6D64) Exception(1) tid(5e38) 8A15000F
2025-07-03 09:54:33.762 [FAIL] C:__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(852)\WindowsPackageManager.dll!00007FFCCAD9EAA7: (caller: 00007FFCCAADCA29) LogHr(1) tid(5e38) 8A15000F Msg:[C:__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(446)\WindowsPackageManager.dll!00007FFCCACC1723: (caller: 00007FFCCACA6D64) Exception(1) tid(5e38) 8A15000F ]
2025-07-03 09:54:33.762 [REPO] Failed to open available source: winget
Environment
PS C:\Windows\system32> winget --info
Windows Package Manager v1.11.400
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.26100.4349
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.26.400.0
Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Installer Downloads %USERPROFILE%\Downloads
Configuration Modules %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules
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
Admin Setting State
--------------------------------------------------
LocalManifestFiles Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Disabled
ProxyCommandLineOptions Disabled
DefaultProxy Disabled
Activity
similar-issues-ai commentedon Jul 4, 2025
We've found some similar issues:
If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.
NBansal97 commentedon Jul 4, 2025
This is what the log file is supposed to look like when successful:
winget_update_log.txt
This is what it looks like when deployed through lansweeper:
winget_update_log_2025-07-02_13-28-52.txt
I can also provide a copy of the script I am running if that helps.
Trenly commentedon Jul 5, 2025
What user identity is Lanesweeper using? WinGet generally requires a logged on user to be able to run, as the ACLs on the source database are tied to the user
denelon commentedon Jul 7, 2025
If the Lansweeper runs in system context, you would need to have the Microsoft.WinGet.Client PowerShell module installed since there is no App Execution Alias support in system context. In theory then the cmdlets "should" work. It will only work for things installed system wide though.
NBansal97 commentedon Jul 18, 2025
Hi Demitrius Nelon (@denelon), thank you for your reply. I really appreciate your assistance with this issue!
Your suggestion allowed me to progress further with my deployment by copying the Microsoft.WinGet.Client PowerShell module onto the C drive and then importing the module.
However, I am now getting the "0x8A15000F Data required by the source is missing" when deploying my WinGet script on some devices but not others. It is unclear to me why some devices are experiencing this error while others are not running the same script.
Here is the verbose log from one of the devices where the script is failing:
WinGet-2025-07-18-09-08-18.848.log
Here is the verbose log from one of the devices where the script is successful:
WinGet-2025-07-18-09-07-22.420.log
I have tried various fixes from various threads, including:
But none of the solutions posted in these threads resolved my issue.
I can also provide a copy of the script I am running if that helps. Thanks!
denelon commentedon Jul 26, 2025
I suspect some devices may have the "winget" source installed because WinGet had been executed by a logged in user at one point in time. In the System context, the MSIX package that contains the PreIndexed package isn't getting installed the same as it would for a logged on user.
You can see it in Apps in Windows Settings if it's installed.
NBansal97 commentedon Jul 30, 2025
Demitrius Nelon (@denelon) does this mean that a WinGet upgrade script will not work when deployed through Lansweeper unless WinGet is pre-installed by a logged in user?
The thing is that Lansweeper runs as a domain user account with admin privileges. So why doesn't the MSIX package that contains the pre-indexed package install properly as it would for any other logged in user?
denelon commentedon Aug 2, 2025
System context is a very special type of an environment when it comes to the MSIX lifecycle. It essentially gets the bits laid down, but the App Execution Aliases aren't enabled. That means the default source which is delivered as an MSIX package gets the bits on the box, but they aren't provisioned and registered the way WinGet is expecting.
agiacomolli commentedon Nov 13, 2025
I'm seeing the same issue on some devices and none of the fixes resolved it. Did you find a fix for this NBansal97?