Installing in Windows with winget does not update the path properly
Environment
- OS: Windows 10 22H2 19045.2846
- scrcpy version: 1.25
- installation method: winget
- device model: MacBook Pro with BootCamp
- Android version: not applicable
Describe the bug
- Open Windows Terminal with PowerShell 7.3.4
- Run
winget install Genymobile.scrcpy - Restart Windows Terminal
- Run
scrcpy
-
Expected: scrcpy starts
-
Actual: Error message is shown in red: scrcpy : The term 'scrcpy ' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Checking the PATH environment variable reveals that the path configured is:
C:\Users\{MI-USER}\AppData\Local\Microsoft\WinGet\Packages\Genymobile.scrcpy_Microsoft.Winget.Source_8wekyb3d8bbwe
This folder contains another folder named scrcpy-win64-v1.25, which contains the binaries.
Temporary fix
Update the PATH environment variable to include \scrcpy-win64-v1.25.
I was not even aware that a winget package was available (#1444). You should report to the author of this package.
(btw, the last scrcpy version is 2.0)
EDIT: Refs
- https://github.com/microsoft/winget-pkgs/tree/master/manifests/g/Genymobile/scrcpy
- https://github.com/microsoft/winget-pkgs/pull/97894
Hello, the executable path is correctly defined in the winget package manifest and this issue is caused by https://github.com/microsoft/winget-cli/issues/2909, you need to wait until this bug is fixed by winget developers.
A priori, it works now. #4005