Open johnburnett opened 2 months ago
Hi @johnburnett Works on my machine (which does not have to mean anything)
Is anybody else facing this issue?
Edit: double-check on another system with other winget version:
Verified in Windows 11 amd64
Sandbox instance.
Successfully verified on a Windows 11 Sandbox Instance:
Hi @johnburnett,
Does this happen with other packages? Would it be possible to try uninstalling the package manager and reinstalling - possibly through the MS Store?
I dug into this a bit more this morning, and in the end it's user error, but explaining for search results. In src\AppInstallerCommonCore\Archive.cpp
, line 30:
wil::com_ptr<IShellFolder> pArchiveShellFolder;
HRESULT res = SHBindToObject(NULL, pidlFull.get(), NULL, IID_PPV_ARGS(&pArchiveShellFolder));
SHBindToObject
was returning E_FAIL. I forget how to dig into COM failures to get more details about the error. However, not being able to create a shell object for a zip archive triggered a memory: I've previously followed the instructions at https://www.sevenforums.com/tutorials/13619-zip-folders-enable-disable-windows-explorer-view.html to disable Explorer's insistence of treating zip files as folders (personal annoyance of mine). The wisdom of following the advice in the link above is certainly debatable. My memory is that the linked .reg files basically do something like:
Remove-Item -Force -Recurse -Path 'Registry::HKEY_CLASSES_ROOT\CompressedFolder\CLSID'
Remove-Item -Force -Recurse -Path 'Registry::HKEY_CLASSES_ROOT\SystemFileAssociations\.zip\CLSID'
Remove-Item -Force -Recurse -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ArchiveFolder'
That all said, I'm willing to bet if I somehow re-registered the above classes, it would fix the issue. I'm not sure how to do that though, and am not super motivated to do so, so I might be out of luck for using winget now. Relying on the shell's archive handler feels a bit wonky (?), but I'm sure there's reasons to do so.
This fixed the issue for me. If it helps anyone here are the .reg files I used for enabling/disabling zip folders.
Disable_ZIP_Compressed_Folders.reg:
Windows Registry Editor Version 5.00 ; Created by: Shawn Brink ; http://www.sevenforums.com ; Tutorial: http://www.sevenforums.com/tutorials/13619-zip-folders-enable-disable-windows-explorer-view.html [-HKEY_CLASSES_ROOT\CompressedFolder\CLSID] [-HKEY_CLASSES_ROOT\SystemFileAssociations.zip\CLSID]
Enable_ZIP_Compressed_Folders.reg:
Windows Registry Editor Version 5.00 ; Created by: Shawn Brink ; http://www.sevenforums.com ; Tutorial: http://www.sevenforums.com/tutorials/13619-zip-folders-enable-disable-windows-explorer-view.html [HKEY_CLASSES_ROOT\CompressedFolder\CLSID] @="{E88DCCE0-B7B3-11d1-A9F0-00AA0060FA31}" [HKEY_CLASSES_ROOT\SystemFileAssociations.zip\CLSID] @="{E88DCCE0-B7B3-11d1-A9F0-00AA0060FA31}"
Please confirm these before moving forward
Category of the issue
Installation issue.
Brief description of your issue
The Bitwarden CLI installer is causing a "Failed to extract the contents of the archive" error across a wide range of package versions, so I'm not sure if the package hasn't worked for a while, or if winget went off the rails (v1.8.1911), or if there's something wrong with my system. The steps below are using a pinned version of 2024.8.1 just for reproducibility, but it happens on other versions I've checked as well.
Steps to reproduce
Actual behavior
"Failed to extract the contents of the archive", and the log says:
I can open the archive
bw-windows-2024.8.1.zip
in the above temp dir and extract it manually by hand just fine using 7-zip, so I'm not sure what the issue is.Expected behavior
A successfully installed package
Environment
Screenshots and Logs
No response