Repository navigation
Closed
Copy link
Labels
Milestone
Description
Brief description of your issue
When changing %TEMP% location to a directory where the user does not have explicit permissions (C:\TEMP, for example), but the user can read/write the folder (the user is in the "Administrators" group), WinGet create the new %TEMP%\WinGet folder, but will write nothing into it and will crash with
Failed to open the predefined source; please report to winget maintainers.
An unexpected error occurred while executing the command:
0x80070005 : unknown error
COM API will also throw exception.
Steps to reproduce
- Change
%TMP%and%TEMP%toC:\TEMP(assuming the folder exists) - Have the
C:\TEMPfolder empty, so WinGet has to createC:\TEMP\WinGetagain - Run (
winget list)
Expected behavior
WinGet should be able to write into that C:\TEMP\WinGet folder if it was able to create it, right?
Actual behavior
WinGet creates the C:\TEMP\WinGet folder (assuming it does not exist) and then crashes.
Environment
Windows Package Manager v1.10.340
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.26100.3194
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.25.340.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 DisabledReacted by de-served
Activity
similar-issues-ai commentedon Mar 5, 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.
WinGet will attemp to correct issues with temp folder permissions (fix …
JohnMcPMS commentedon Mar 6, 2025
Can you provide the ACL for the
C:\TEMPdirectory?A log file would be helpful as well.
If the process is crashing, contents of one of the events from Event Viewer > Windows Logs > Application would be good.
marticliment commentedon Mar 7, 2025
ACLs
(Output is in spanish, Administradores refers to Administrators, Usuarios refers to Users)
WinGet Logs:
Event Viewer
There doesn't seem to be any reports about the crash on event viewer.
The CLI output of the crash is posted on the original message, and the return code of the process is -2147024891 (
0x80070005)JohnMcPMS commentedon Mar 7, 2025
Assuming that my local repro was consistent with your repro (and the initial customer issue), then this PR should fix things.
If you want to be very sure that I got the same issue, if the
WinGetdirectory created during the repro exists, this would fail with access denied:and this would succeed (removal of
WRITE_OWNER):