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

Output of winget search "" is not complete #2860

Closed
Frxhb opened this issue Jan 17, 2023 · 2 comments
Closed

Output of winget search "" is not complete #2860

Frxhb opened this issue Jan 17, 2023 · 2 comments
Milestone

Comments

@Frxhb
Copy link

Frxhb commented Jan 17, 2023

Brief description of your issue

I would like to use winget to search for all packages and store them in a text file or a variable. Later on I would like to sort them in a list with "Name" and "ID". Unfortunately it seems like you cannot search just for winget package Names and IDs directly using winget.exe.


What I have tried so far:

Clear-Host

if (Test-Path -path "$env:temp\download_winget"){
    write-host "Folder exists. Continuing..."
}
else{
    write-Host "There is no folder called winget_download!`nCreating..."
    mkdir "$env:temp\download_winget"
    
}

$get_winget_packages = winget search . --accept-source-agreements | Out-File "$env:temp\download_winget\winget_packages.txt" -Encoding utf8

(Yes I know, you can also use winget search """")

I even tried it with a new powershell process with windowstyle maximized:

Start-Process powershell.exe -ArgumentList ("winget search ." , "| Out-File '$env:temp\download_winget\winget_packages_lol.txt' -Encoding utf8") -WindowStyle Maximized

Steps to reproduce

Clear-Host

if (Test-Path -path "$env:temp\download_winget"){
    write-host "Folder exists. Continuing..."
}
else{
    write-Host "There is no folder called winget_download!`nCreating..."
    mkdir "$env:temp\download_winget"
    
}

$get_winget_packages = winget search . --accept-source-agreements | Out-File "$env:temp\download_winget\winget_packages.txt" -Encoding utf8

gc $get_winget_packages 

Expected behavior

I want to have an output with all correct winget packages ID and Names.

Actual behavior

As you can see, I displayed with gc "$env:temp\download_winget\winget_packages.txt" the content of the earlier created file. Unfortunately some of the lines are not displayed correctly. For example:

Name                                      ID                                  Version            Ãœbereinstimmung Quelle
-----------------------------------------------------------------------------------------------------------------------
...
...
...
Windows Package Manager Manifest Creator  Microsoft.WingetCreate              1.1.2.0                            winget
Remote Desktop Services Infrastructure A… Microsoft.WindowsVirtualDesktopAge… 1.0.5739.9800                      winget
Windows Terminal Preview                  Microsoft.WindowsTerminal.Preview   1.16.3463.0                        winget
Windows Admin Center                      Microsoft.WindowsAdminCenter        1.3.53858.0                        winget
Windows Assessment and Deployment Kit     Microsoft.WindowsADK                10.1.22621.1                       winget

I did not find any solution to get all winget packages full Name or full ID using winget search .
Even running this directly in PowerShell or CMD, it will display some package Names and ID not fully. Changing the Encoding to utf32, ascii, utf7 or something else wont change anything too.

Is there a workaround to show the correct/full names of all winget packages Name and ID?
2023-01-17 15_31_46-Administrator_ Windows PowerShell

Environment

Windows-Paket-Manager v1.2.10691
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.

Windows: Windows.Desktop v10.0.22621.1105
Paket: Microsoft.DesktopAppInstaller v1.17.10691.0

Protokolle: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

Links
-----------------------------------------------------------------------------------------
Datenschutzerklärung              https://aka.ms/winget-privacy
Lizenzvereinbarung                https://aka.ms/winget-license
Hinweise von Drittanbietern       https://aka.ms/winget-3rdPartyNotice
Startseite                        https://aka.ms/winget
Windows Store Nutzungsbedingungen https://www.microsoft.com/en-us/storedocs/terms-of-sale
@ghost ghost added the Needs-Triage Issue need to be triaged label Jan 17, 2023
@Frxhb Frxhb closed this as completed Jan 17, 2023
@ghost ghost removed the Needs-Triage Issue need to be triaged label Jan 17, 2023
@Frxhb Frxhb reopened this Jan 17, 2023
@Frxhb Frxhb changed the title Output of winget search "" is not complete. Output of winget search "" is not complete Jan 17, 2023
@Trenly
Copy link
Contributor

Trenly commented Jan 17, 2023

Seems like this duplicates #2603

The output is truncated to fit the terminal width in the CLI. We've got PowerShell modules and cmdlets coming out in the next release which don't truncate the output.

@Frxhb
Copy link
Author

Frxhb commented Jan 17, 2023

Seems like a duplicate, yes. Thanks alot.

@Frxhb Frxhb closed this as completed Jan 17, 2023
@denelon denelon added this to the v1.5-Client milestone Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants