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
23.3k stars 1.45k forks source link

Detection Method #260

Open dkattan opened 4 years ago

dkattan commented 4 years ago

Description - Add a detection method property similar to SCCM.

Software packagers do all kinds of dumb things that require custom detection.

Proposed technical implementation details

Detection Script

Include an optional "DetectionScript" field in your package manifest that accepts a PowerShell script that returns a valid semantic version if it is installed, and Null or Empty string if it is not. The script can look at file versions and other places indicative of the actual installed version of the software.

Add regex and version capture support to the name field

For software that places its version in DisplayName and not DisplayVersion, allow a regex pattern to capture the version. I've seen a lot of LOB apps do this. For a DisplayName of "My Ancient LoB Soft Pro 18.7.123" the regex pattern could be "My Ancient LoB Soft Pro (\d+.\d+.\d+)"

sschuberth commented 4 years ago

Maybe detection scripts could be shared with those from RuckZuck?

Trenly commented 2 years ago

@denelon - Is this resolved with the ARP entry matching?

denelon commented 2 years ago

@Trenly not all the use cases above are resolved. Some of them are most likely unactionable at this time. We've been discussing some additional options, and these types of challenges are also what led to:

Trenly commented 2 years ago

@Trenly not all the use cases above are resolved. Some of them are most likely unactionable at this time. We've been discussing some additional options, and these types of challenges are also what led to:

Ah, makes sense; Thank you