microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
22.54k stars 1.39k forks source link

Launch COM server for elevated use via packaged path #4567

Closed JohnMcPMS closed 1 week ago

JohnMcPMS commented 1 week ago

Change

Leverage the feature that allows launching a packaged process via its packaged executable location as long as there is a matching alias. This better ensures that we are launching the correct process.

Validation

While the dev usage can't use this path due to the way it and development deployed packages work, the code to find the executable is being run to ensure correct functionality. It is then replaced with the alias path that was being used previously.

Microsoft Reviewers: Open in CodeFlow
PatrickSchmidtSE commented 4 days ago

@JohnMcPMS Could this also help with general COM stuff ?.we are using the COM API to install/update packages. But performance is worse than using CLI . CLI works most of the time but COM method delivers "No applicable installer" for many packages. And cli with same options works just fine. Code must be also fine because some packages can be updates via COM.api. but success rate is 40% in COM vs 90% in cli

If not I am happy to provide some details :)

JohnMcPMS commented 4 days ago

@JohnMcPMS Could this also help with general COM stuff ?.we are using the COM API to install/update packages. But performance is worse than using CLI . CLI works most of the time but COM method delivers "No applicable installer" for many packages. And cli with same options works just fine. Code must be also fine because some packages can be updates via COM.api. but success rate is 40% in COM vs 90% in cli

If not I am happy to provide some details :)

This should have no functional impact and probably wouldn't even affect your use. Creating an issue with details is the best thing to do. Make sure you include how exactly you are using the COM API (user, session, where you got the binaries, etc.)

PatrickSchmidtSE commented 4 days ago

@JohnMcPMS https://github.com/microsoft/winget-cli/issues/4589 here is the issue :)