winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

WinGet Configure (0x80040154: Class not registered)

Open denelon opened this issue 9 months ago • 2 comments

Brief description of your issue

Other WinGet commands are working, but configuration is failing:

Image

Steps to reproduce

`winget configure -f "path to file"

Expected behavior

WinGet Configuration Succeeds

Actual behavior

I get: 0x80040154: Class not registered

Environment

WinGet 1.10.320

denelon avatar Feb 28 '25 18:02 denelon

This is on Server 2019: OS: Windows.Desktop v10.0.17763.6893. Reproes on Client RS5 VM.

Debugging shows that it is failing to find Microsoft.Management.Configuration.dll despite that binary being in the package root. Last error after the call to LoadLibraryExW is ERROR_MOD_NOT_FOUND. The C++/WinRT attempts to load the library use LOAD_LIBRARY_SEARCH_DEFAULT_DIRS. I'm assuming that this is a resolved OS issue that didn't get backported, since things are working fine in later OSes.

That load library flag does allow a potential mitigation: using AddDllDirectory or SetDllDirectory to manually add the package root and hopefully bypass the issue.

JohnMcPMS avatar Feb 28 '25 18:02 JohnMcPMS

I installed latest winget on Server 2022 using https://www.powershellgallery.com/packages/winget-install/5.1.0. winget install command runs fine but configure does not. Instead I get a slightly different error code. My log contents are:

2025-04-26 00:35:51.600 [CORE] WinGet, version [1.10.390], activity [{32AE0329-1921-45AE-8345-871AC27B179F}]
2025-04-26 00:35:51.601 [CORE] OS: Windows.Server v10.0.20348.2966
2025-04-26 00:35:51.601 [CORE] Command line Args: "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.25.390.0_x64__8wekyb3d8bbwe\winget.exe" configure --file C:\temp\dsc\configuration.dsc.yaml --accept-configuration-agreements --verbose --logs
2025-04-26 00:35:51.601 [CORE] IsCOMCall:0; Caller: winget-cli
2025-04-26 00:35:51.604 [CLI ] WinGet invoked with arguments: 'configure' '--file' 'C:\temp\dsc\configuration.dsc.yaml' '--accept-configuration-agreements' '--verbose' '--logs'
2025-04-26 00:35:51.604 [CLI ] Found subcommand: configure
2025-04-26 00:35:51.604 [CLI ] Leaf command to execute: root:configure
2025-04-26 00:35:51.605 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2025-04-26 00:35:51.605 [CORE] Admin settings was not found
2025-04-26 00:35:51.605 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2025-04-26 00:35:51.605 [CORE] Admin settings was not found
2025-04-26 00:35:51.605 [CLI ] Executing command: configure
2025-04-26 00:35:51.605 [WORK] Running task: 0x00007FFE0B9B2B80 [ln 00000001`80000000+222b80]
2025-04-26 00:35:51.605 [WORK] Running task: VerifyFileOrUri
2025-04-26 00:35:51.606 [WORK] Running task: VerifyFile
2025-04-26 00:35:51.606 [WORK] Running task: 0x00007FFE0B99CC50 [ln 00000001`80000000+20cc50]
2025-04-26 00:35:51.609 [CONF] Launching process for configuration processing...
2025-04-26 00:35:51.639 [CONF]   Configuration remote PID is 1280
2025-04-26 00:35:51.718 [CONF] ... configuration processing connection established.
2025-04-26 00:35:51.724 [FAIL] WindowsPackageManager.dll!00007FFE0B923851: LogHr(1) tid(1f90) 80004002 No such interface supported


2025-04-26 00:35:51.724 [FAIL] WindowsPackageManager.dll!00007FFE0BBDBC26: ReturnHr(1) tid(1f90) 80004002 No such interface supported

    Msg:[winrt::hresult_error: No such interface supported] 

2025-04-26 00:35:51.724 [FAIL] WindowsPackageManager.dll!00007FFE0B9B4DB1: LogHr(2) tid(1f90) 80004002 No such interface supported


2025-04-26 00:35:51.985 [CLI ] Caught winrt::hresult_error: 0x80004002 : No such interface supported

Interestingly, version 5.0.6 of the script installed winget in December and configuration command was working then.

tristanbarcelon avatar Apr 26 '25 04:04 tristanbarcelon