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

Unable to install PowerShell Preview 7.4 with PowerShell 7.3 installed. #2886

Open
dembeck opened this issue Jan 27, 2023 · 5 comments
Open
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.

Comments

@dembeck
Copy link

dembeck commented Jan 27, 2023

Brief description of your issue

When attempting to install PowerShell Preview 7.4 side-by-side with PowerShell 7.3 using winget, the installation is blocked with the message "Found an existing package already installed."

It appears that winget is identifying the installed version of PowerShell 7.3 as PowerShell Preview 7.4.

Steps to reproduce

  1. Search for available packages winget search "Microsoft.PowerShell
  2. Attempt to install PowerShell Preview winget install --source 'winget' --interactive --id 'Microsoft.PowerShell.Preview''

Expected behavior

winget should successfully install PowerShell Preview 7.4 side-by-side with PowerShell 7.3.

Actual behavior

winget is unable to differentiate between the two versions of PowerShell and is therefore preventing the installation of the Microsoft.PowerShell.Preview package.

winget listing installed versions of PowerShell.

  • Notice how it identifies PowerShell 7.3 as both "Microsoft.PowerShell" and "Microsoft.PowerShell.Preview".
> winget list --id "Microsoft.PowerShell"

Name                   Id                   Version Source
-----------------------------------------------------------
PowerShell 7.3.1.0-x64 Microsoft.PowerShell 7.3.1.0 winget



> winget list --id "Microsoft.PowerShell.Preview"
Name                   Id                           Version   Available Source
------------------------------------------------------------------------------
PowerShell 7.3.1.0-x64 Microsoft.PowerShell.Preview < 7.4.1.0 7.4.1.0   winget

winget search results and installation error message.

  • I included two different attempts at installing, as they have slightly different error messages.
> winget search "Microsoft.PowerShell"
Name       Id                           Version Source
-------------------------------------------------------
PowerShell Microsoft.PowerShell         7.3.1.0 winget
PowerShell Microsoft.PowerShell.Preview 7.4.1.0 winget



> winget install --scope 'machine' --architecture 'X64' --source 'winget' --interactive --exact --id 'Microsoft.PowerShell.Preview'
Found an existing package already installed. Trying to upgrade the installed package...
No applicable upgrade found.



> winget install --source 'winget' --interactive --id 'Microsoft.PowerShell.Preview'
Found an existing package already installed. Trying to upgrade the installed package...
A newer version was found, but the install technology is different from the current version installed. Please uninstall the package and install the newer version.

Environment

Windows Package Manager (Preview) v1.5.101-preview
Windows: Windows.Desktop v10.0.22621.1105
Package: Microsoft.DesktopAppInstaller v1.20.101.0
@ghost ghost added the Needs-Triage Issue need to be triaged label Jan 27, 2023
@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Jan 27, 2023
@denelon
Copy link
Contributor

denelon commented Jan 27, 2023

@dembeck do you know if a version of PowerShell from the Microsoft Store has been installed on the machine?

Can you run winget list --id "Microsoft.PowerShell" --source winget

Then run winget list --id "Microsoft.PowerShell"

You should be able to install both versions side by side. WinGet is trying to avoid breaking anything related to installer type changes. I don't want your environment broken, but if you add "--force" to the end of an "install" command, WinGet will bypass the warnings and just run the installer.

@dembeck
Copy link
Author

dembeck commented Jan 28, 2023

I think that on this machine I initially installed PS 7.x with the msi from the PowerShell repo. When there is an update, sometimes I use winget, other times I use the latest msi.

> winget list --id "Microsoft.PowerShell" --source winget
Name                   Id                   Version
---------------------------------------------------
PowerShell 7.3.1.0-x64 Microsoft.PowerShell 7.3.1.0


> winget list --id "Microsoft.PowerShell"
Name                   Id                   Version Source
-----------------------------------------------------------
PowerShell 7.3.1.0-x64 Microsoft.PowerShell 7.3.1.0 winget
> Get-Command -Name "*pwsh*"

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     pwsh.exe                                           7.3.1.0    C:\Program Files\PowerShell\7\pwsh.exe

@dembeck
Copy link
Author

dembeck commented Jan 31, 2023

@denelon Is there anything else you want me to check or any logs that you want me to collect?

I have held off installing PS preview on this system using the force flag or using the msi in case there was any other information you wanted.

@denelon
Copy link
Contributor

denelon commented Jan 31, 2023

There were a couple of other PowerShell related issues I was looking into.

The PowerShell from the Microsoft Store is the "MSIX" package.
The PowerShell from the community repository is the "MSI" package (excluding the ARM64 variant)

Some changes had been made to the manifest and were subsequently reverted to pull the MSIX versions back out for x86 and x64.

The machine scope is being added back to the manifests now (unfortunately, we're having some issues with the validation pipelines so they are currently stalled)

@denelon denelon added this to the v1.5-Client milestone Feb 14, 2023
@denelon denelon added this to WinGet Feb 14, 2023
@denelon denelon modified the milestones: v1.5-Client, v.Next-Client Apr 18, 2023
@denelon denelon removed this from WinGet Jun 13, 2023
@tb-mtg
Copy link

tb-mtg commented Nov 2, 2023

When running winget upgrade --id Microsoft.PowerShell I also get

A newer version was found, but the install technology is different from the current version installed. Please uninstall the package and install the newer version.

We have a WSUS server that installs Powershell causing an issue as it installs using an .exe, whereas I think Winget uses .msi.

How can we get around this?

@denelon denelon removed this from the v.Next-Client milestone Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

3 participants