winget-cli
winget-cli copied to clipboard
Detection Method
Description - Add a detection method property similar to SCCM.
Software packagers do all kinds of dumb things that require custom detection.
- Not placing a key in the registry at all
- Including versions in the DisplayName
- Not including versions in the DisplayVersion
- Having a DisplayName with special characters that mess with regex (Notepad++)
- Self-updating by overwriting files in Program Files, but not updating the registry with the new DisplayVersion
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+)"
@denelon - Is this resolved with the ARP entry matching?
@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:
- #2252
@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