Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] PowerShell7 was not found! #2886

Open
4 tasks done
PhoenixxClaw opened this issue Oct 24, 2024 · 2 comments
Open
4 tasks done

[BUG] PowerShell7 was not found! #2886

PhoenixxClaw opened this issue Oct 24, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@PhoenixxClaw
Copy link

Please confirm these before moving forward

  • I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
  • I have tested that this issue has not been fixed in the latest (beta or stable) release.
  • I have checked the FAQ section for solutions.
  • This issue is about a bug (if it is not, please use the correct template).

UniGetUI Version

3.1.2

Windows version, edition, and architecture

Windows 11 Education - Version 23H2 (Build 22631.4391) - x64

Describe your issue

I am getting the Error Message PowerShell 7.x was not found! You may need to install PowerShell 7.x in order to use it with UniGetUl., when opening up the Settings for the PowerShell 7.x package manager.

Steps to reproduce the issue

Open UniGetUI > Settings > Scroll down to Package Managers > Scroll down in that section to PowerShell 7.x > Open the drop down to notice the error at the bottom.

UniGetUI Log

[24-Oct-24 10:00:01]    __  __      _ ______     __  __  ______
                       / / / /___  (_) ____/__  / /_/ / / /  _/
                      / / / / __ \/ / / __/ _ \/ __/ / / // /
                     / /_/ / / / / / /_/ /  __/ /_/ /_/ // /
                     \____/_/ /_/_/\____/\___/\__/\____/___/
                         Welcome to UniGetUI Version 3.1.2
[24-Oct-24 10:00:01]
[24-Oct-24 10:00:01] Version Code:  3.12
[24-Oct-24 10:00:01] Encoding Code Page set to 437
[24-Oct-24 10:00:01] Using bundled GSudo at C:\Program Files\UniGetUI\Assets\Utilities\gsudo.exe
[24-Oct-24 10:00:02] Loaded language locale: en
[24-Oct-24 10:00:02] Randomly-generated background API auth token for the current session: nwogmy0msfepa6uq998y09u59alnjykx5pzbme0sd21p5tux8usb9qekvr5jbdvk
[24-Oct-24 10:00:02] Api running on http://localhost:7058
[24-Oct-24 10:00:02] Lang files were updated successfully from GitHub
[24-Oct-24 10:00:03] Downloaded new icons and screenshots successfully!
[24-Oct-24 10:00:03] UniGetUI is up to date
[24-Oct-24 10:00:03] Command pwsh.exe was not found on the system
[24-Oct-24 10:00:03] Command cargo was not found on the system
[24-Oct-24 10:00:03] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                     █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                     █ Name: PowerShell7
                     █ Enabled: True
                     █ Found: False
                     █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                     █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[24-Oct-24 10:00:03] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                     █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                     █ Name: Cargo
                     █ Enabled: True
                     █ Found: False
                     █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                     █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[24-Oct-24 10:00:03] Command npm was not found on the system
[24-Oct-24 10:00:03] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                     █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                     █ Name: Npm
                     █ Enabled: True
                     █ Found: False
                     █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                     █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[24-Oct-24 10:00:03] Command winget.exe was not found on the system
[24-Oct-24 10:00:03] User does not have WinGet installed, forcing bundled WinGet...
[24-Oct-24 10:00:03] Command dotnet.exe was not found on the system
[24-Oct-24 10:00:03] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                     █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                     █ Name: .NET Tool
                     █ Enabled: True
                     █ Found: False
                     █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                     █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[24-Oct-24 10:00:03] Command python.exe was not found on the system
[24-Oct-24 10:00:03] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                     █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                     █ Name: Pip
                     █ Enabled: True
                     █ Found: False
                     █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                     █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[24-Oct-24 10:00:03] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                     █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                     █ Name: Winget
                     █ Enabled: True
                     █ Found: True
                     █ Fancy exe name: winget.exe
                     █ Executable path: C:\Program Files\UniGetUI\winget-cli_x64\winget.exe
                     █ Call arguments: 
                     █ Version: 
                     █   Bundled WinGet CLI Version: v1.8.1911
                     █   Using bundled WinGet helper (CLI parsing)
                     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[24-Oct-24 10:00:06] Command scoop was not found on the system
[24-Oct-24 10:00:06] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                     █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                     █ Name: Scoop
                     █ Enabled: True
                     █ Found: False
                     █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                     █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[24-Oct-24 10:00:06] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                     █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                     █ Name: Chocolatey
                     █ Enabled: True
                     █ Found: True
                     █ Fancy exe name: choco.exe
                     █ Executable path: C:\Users\phoenixclaw\AppData\Local\UniGetUI\Chocolatey\choco.exe
                     █ Call arguments: 
                     █ Version: 
                     █   2.2.2
                     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[24-Oct-24 10:00:07] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                     █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                     █ Name: PowerShell
                     █ Enabled: True
                     █ Found: True
                     █ Fancy exe name: powershell.exe
                     █ Executable path: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
                     █ Call arguments:  -NoProfile -Command
                     █ Version: 
                     █   Name                           Value                                                                                   
                     █   ----                           -----                                                                                   
                     █   PSVersion                      5.1.22621.4391                                                                          
                     █   PSEdition                      Desktop                                                                                 
                     █   PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
                     █   BuildVersion                   10.0.22621.4391                                                                         
                     █   CLRVersion                     4.0.30319.42000                                                                         
                     █   WSManStackVersion              3.0                                                                                     
                     █   PSRemotingProtocolVersion      2.3                                                                                     
                     █   SerializationVersion           1.1.0.1
                     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[24-Oct-24 10:00:07] LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
[24-Oct-24 10:00:08] Resetting administrator rights cache for process id 26824
[24-Oct-24 10:00:09] Found 262 installed packages from Winget
[24-Oct-24 10:00:09] Ignored updates database was never loaded, so it is going to be loaded now
[24-Oct-24 10:00:09] Found 3 available updates from Winget
[24-Oct-24 10:00:10] Found 0 installed packages from Chocolatey
[24-Oct-24 10:00:10] Found 0 available updates from Chocolatey
[24-Oct-24 10:00:11] Found 4 installed packages from PowerShell
[24-Oct-24 10:00:13] Found 0 available updates from PowerShell

Package Managers Logs

Manager WinGet with version:
Bundled WinGet CLI Version: v1.8.1911
Using bundled WinGet helper (CLI parsing)

——————————————————————————————————————————


Logged subprocess-based task on manager Winget. Task type is FindPackages
Subprocess executable: "C:\Program Files\UniGetUI\winget-cli_x64\winget.exe"
Command-line arguments: " source list"
Process start time: 24-Oct-24 10:00:03
Process end time:   24-Oct-24 10:00:03

-- Process STDOUT
 ...

Return code: SUCCESS (0)

——————————————————————————————————————————

Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Program Files\UniGetUI\winget-cli_x64\winget.exe"
Command-line arguments: " source update --disable-interactivity"
Process start time: 24-Oct-24 10:00:07
Process end time:   24-Oct-24 10:00:08

-- Process STDOUT
 ...

Return code: SUCCESS (0)

——————————————————————————————————————————

Logged subprocess-based task on manager Winget. Task type is ListInstalledPackages
Subprocess executable: "C:\Program Files\UniGetUI\winget-cli_x64\winget.exe"
Command-line arguments: " list  --accept-source-agreements"
Process start time: 24-Oct-24 10:00:07
Process end time:   24-Oct-24 10:00:09

-- Process STDOUT
 ...

Return code: SUCCESS (0)

——————————————————————————————————————————

Logged subprocess-based task on manager Winget. Task type is FindPackages
Subprocess executable: "C:\Program Files\UniGetUI\winget-cli_x64\winget.exe"
Command-line arguments: " source list"
Process start time: 24-Oct-24 10:00:08
Process end time:   24-Oct-24 10:00:08

-- Process STDOUT
 ...

Return code: SUCCESS (0)

——————————————————————————————————————————

Logged subprocess-based task on manager Winget. Task type is ListUpdates
Subprocess executable: "C:\Program Files\UniGetUI\winget-cli_x64\winget.exe"
Command-line arguments: " update --include-unknown  --accept-source-agreements"
Process start time: 24-Oct-24 10:00:08
Process end time:   24-Oct-24 10:00:09

-- Process STDOUT
 ...

Return code: SUCCESS (0)

——————————————————————————————————————————

Relevant information

The Manager for Version 5.x works fine and has the correct path and command listed in it's settings.
The Manager for Version 7.x only lists -NoProfile -Command in it's path..
PATH Variables are set correctly and where.exe pwsh.exe, ran from a default cmd, shows the correct path as result. (screenshot below)
UniGetUI itself even shows Powershell 7.4.5 as being installed in it's package list..

compared to #2774 a reinstall did not help. Even uninstalling with revo uninstaller and manually clearing any leftover registry keys that have the Powershell 7 path in them, plus having reboots inbetween each action did not help resolving this.

Screenshots and videos

Powershell 7.4.5 installed and running
{F6748451-FA41-41F9-AEBB-F4A70ABD556F}

Powershell 7.4.5 shown as installed in UniGetUI
{FAB04DAF-116A-4EE1-B1BA-DDD82DE157C6}

where.exe pwsh.exe Result in a default cmd
{2EC0A846-E093-463D-B1B8-31BB07D7A3FF}

@PhoenixxClaw PhoenixxClaw added the bug Something isn't working label Oct 24, 2024
@marticliment
Copy link
Owner

This is weird, I will investigate.

@JAK1047
Copy link
Contributor

JAK1047 commented Oct 26, 2024

Just out of curiosity if you add the Powershell 7 path to your user path environment variable instead of your system one (or vice versa depending on your current setup) does UniGetUI find it then? "Where" just searches the current directory and falls back on %PATH% and while the user path is supposed to be appended to the system path I have seen situations where processes fail to refresh the environment variables.

I suppose as an enhancement the UniGetUI could also check the App Paths regkey as a last ditch effort to get it if it's missing from %PATH% for any reason, i.e., the where.exe check fails.

image
https://learn.microsoft.com/en-us/windows/win32/shell/app-registration

Microsoft's purpose was for developers to use this instead of %PATH% to begin with since modify %PATH% is risky. Doubt all the managers conform to that but I do see at least the Powershell's are in mine.

I guess could also just toss in a simple File.Exists check with the common default install paths on these since it would just be a fallback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants