Open RalfReddings opened 6 months ago
We've released a newer version of the Microsoft.WinGet.Client PowerShell module: https://www.powershellgallery.com/packages/Microsoft.WinGet.Client/1.6.3133.0
There were some changes/improvements in the WinGet COM APIs. Upgrading the module should address this issue.
@denelon
Hey thanks, I installed the new version you mentioned and tested. I just wanted to confirm that it too is suffering the same issue.
Get-Module -name *wing*
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Binary 1.6.3133.0 Microsoft.WinGet.Client {Add-WinGetSource,
I updated Code earlier so I tried updating teracopy
:
Get-WinGetPackage teracopy
Name Id Version Available Source
---- -- ------- --------- ------
TeraCopy CodeSector.TeraCopy 3.9.2 3.17 winget
And attempting to update it:
Get-WinGetPackage teracopy | Update-WinGetPackage
CorrelationData :
InstallerErrorCode : 0
ExtendedErrorCode : System.Runtime.InteropServices.COMException (0x80072EFD): 0x80072EFD
RebootRequired : False
Status : InternalError
@ralfreddings - I was able to find a workaround by specifying -Property Id
with the Select-Object
PS C:\Users\Trenly> Find-WinGetPackage Notepad++ -source winget| Select-Object -First 1| Update-WinGetPackage
Id Name Source InstallerErrorCode Status RebootRequired ExtendedErrorCode
-- ---- ------ ------------------ ------ -------------- -----------------
Notepad++.Notepad++ Notepad++ winget 0 InvalidOptions False System.Runtime.InteropServices.C…
PS C:\Users\Trenly> Find-WinGetPackage Notepad++ -source winget| Select-Object -First 1 -Property Id| Update-WinGetPackage
Id Name Source InstallerErrorCode Status RebootRequired ExtendedErrorCode CorrelationData
-- ---- ------ ------------------ ------ -------------- ----------------- ---------------
Notepad++.Notepad++ Notepad++ winget 0 Ok False
It's working on some packages but failing on some
$ Find-WinGetPackage Warp -source winget | Select-Object -Property Id -First 1 | Update-WinGetPackage | Format-List
Id : Cloudflare.Warp
Name : Cloudflare WARP
Source : winget
CorrelationData :
InstallerErrorCode : 0
ExtendedErrorCode : System.Runtime.InteropServices.COMException (0x80070652)
RebootRequired : False
Status : InternalError
$ Find-WinGetPackage CMake -source winget | Select-Object -Property Id -First 1 | Update-WinGetPackage | Format-List
Id : Kitware.CMake
Name : CMake
Source : winget
CorrelationData :
InstallerErrorCode : 0
ExtendedErrorCode :
RebootRequired : False
Status : Ok
Brief description of your issue
I am not able to update installed packages by either piping package names to
Update-WinGetPackage
or using the command directlySteps to reproduce
I am using the version
0.2.2
of winget.Attempting to install the first one,
Microsoft Visual Studio Code
, returns an error (I think):Starting Code and checking
about
confirms that it was not updated. I also tried usingUpdate-WinGetPackage
directly, I end up with the same above issue:Expected behavior
Update the visual studio code application
Actual behavior
I get an error (mentioned above)
Environment