Closed Reeceeboii closed 5 days ago
Try to:
Uninstall-Module Microsoft.WinGet.Client
repeatedly until it complains the module is not installed. Run this command in PowerShell 5.1.Install-Module Microsoft.WinGet.Client
and see what happensYep that fixed it, thanks :) I will note that as above, the Expand version
option still shows no version for the PSModule.
I could not figure out how to fix it. The fix described here doesn't seem to work for me.
This is the error I get when Uniget is trying to install the extension:
PackageManagement\Install-Package : The following commands are already available on this system:'Find-WinGetPackage,Get
-WinGetPackage,Get-WinGetSource,Install-WinGetPackage,Uninstall-WinGetPackage,Update-WinGetPackage'. This module
'Microsoft.WinGet.Client' may override the existing commands. If you still want to install this module
'Microsoft.WinGet.Client', use -AllowClobber parameter.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package],
Exception
+ FullyQualifiedErrorId : CommandAlreadyAvailable,Validate-ModuleCommandAlreadyAvailable,Microsoft.PowerShell.Pack
ageManagement.Cmdlets.InstallPackage
Press Enter to continue...:
This is the error when trying to uninstall it:
Power shell: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
, which is the one that UniGetUI seems to use:
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\Windows\System32\WindowsPowerShell\v1.0> Uninstall-Module Microsoft.WinGet.Client
PackageManagement\Uninstall-Package : No match was found for the specified search criteria and module names
'Microsoft.WinGet.Client'.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:2194 char:21
+ ... $null = PackageManagement\Uninstall-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Microsoft.Power...ninstallPackage:UninstallPackage) [Uninstall-Package]
, Exception
+ FullyQualifiedErrorId : NoMatchFound,Microsoft.PowerShell.PackageManagement.Cmdlets.UninstallPackage
PS C:\Windows\System32\WindowsPowerShell\v1.0>
(same as admin)
The Module doesn't seem to be installed:
PS C:\WINDOWS\system32> Get-Module
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...}
Script 2.0.0 PSReadLine {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PSReadLineKeyHandler, Set-PSReadLineKeyHandler...}
PS C:\WINDOWS\system32> Install-Module Microsoft.WinGet.Client
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): Y
PackageManagement\Install-Package : The following commands are already available on this system:'Find-WinGetPackage,Get-WinGetPackage,Get-WinGetSource,Install-WinGetPackage,Uninstall-WinGetPackage,Update-WinGetPackage'. This module
'Microsoft.WinGet.Client' may override the existing commands. If you still want to install this module 'Microsoft.WinGet.Client', use -AllowClobber parameter.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : CommandAlreadyAvailable,Validate-ModuleCommandAlreadyAvailable,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
Please run the command with an extra parameter, as said in the Error message: Install-Module Microsoft.WinGet.Client -AllowClobber
Thanks! This seemed to have worked:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
Loading personal and system profiles took 599ms.
PS C:\Users\user> Install-Module Microsoft.WinGet.Client -AllowClobber
Install-Module : Administrator rights are required to install modules in 'C:\Program Files\WindowsPowerShell\Modules'.
Log on to the computer with an account that has Administrator rights, and then try again, or install
'C:\Users\user\Documents\WindowsPowerShell\Modules' by adding "-Scope CurrentUser" to your command. You can also try
running the Windows PowerShell session with elevated rights (Run as Administrator).
At line:1 char:1
+ Install-Module Microsoft.WinGet.Client -AllowClobber
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Install-Module], ArgumentException
+ FullyQualifiedErrorId : InstallModuleNeedsCurrentUserScopeParameterForNonAdminUser,Install-Module
PS C:\Users\user> Install-Module Microsoft.WinGet.Client -AllowClobber -Scope CurrentUser
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): Y
PS C:\Users\user>
Isn't it dangerous if another module exports the same commandlets? The new module might hide the existing commands.
Yes, but I can't do much about it
Please confirm these before moving forward
UniGetUI Version
3.1.0
Windows version, edition, and architecture
Windows 11 Education 23H2 x64 (OS Build 22631.3810)
Describe your issue
After the most recent update that changed WingetUI to UniGetUI, I seem to be stuck in a loop on application startup that attempts to install the WinGet PowerShell module over and over again without acknowledging that the previous install had succeeded.
Open UniGetUI after 3.1.0 update, prompted to install module:![Screenshot 2024-07-03 220606](https://github.com/marticliment/UniGetUI/assets/42159320/a7a2e0c7-8475-401f-b5c6-bfd7134e058c)
Install module, PowerShell opens, installs, then closes on key press:
![Screenshot 2024-07-03 220538](https://github.com/marticliment/UniGetUI/assets/42159320/e99bae18-dd60-45ef-9905-7f588422ef52)
UniGetUI asks to restart, say yes:![Screenshot 2024-07-03 220551](https://github.com/marticliment/UniGetUI/assets/42159320/0b02d420-2ffd-4914-a6b9-bafa2b2fbeaf)
On next startup, the prompt reappears:![Screenshot 2024-07-03 220508](https://github.com/marticliment/UniGetUI/assets/42159320/e4ea1fba-156b-40a7-b415-19c13ee18e36)
Steps to reproduce the issue
See description.
UniGetUI Log
Package Managers Logs
Relevant information
Package Managers Logs seem to show some PowerShell errors.
I have both PowerShell
7.4.3
(installed via WinGet) and5.1.22621.3810
(bundled with Windows) on my system.It also still seems to suggest that the module is installed, but fails to show a version:
Screenshots and videos
See description.